diff --git a/centos.json b/centos.json index 23e75b0..8f654fb 100644 --- a/centos.json +++ b/centos.json @@ -13,7 +13,8 @@ "vm_ssh_username": "", "vm_vcpu": "" }, - "builders": [{ + "builders": [ + { "boot_command": [ " {{ user `boot_command_prefix` }}=http://{{ .HTTPIP }}:{{ .HTTPPort }}/centos/ks.cfg " ], @@ -63,17 +64,20 @@ } } ], - "provisioners": [{ - "type": "shell", - "scripts": [ - "scripts/base.sh", - "scripts/vagrant.sh", - "scripts/virtualbox.sh", - "scripts/vmware.sh", - "scripts/cleanup.sh" - ] - }], - "post-processors": [{ + "provisioners": [ + { + "type": "shell", + "scripts": [ + "scripts/base.sh", + "scripts/vagrant.sh", + "scripts/virtualbox.sh", + "scripts/vmware.sh", + "scripts/cleanup.sh" + ] + } + ], + "post-processors": [ + { "compression_level": "{{ user `compression_level` }}", "output": "{{ user `vm_name` }}-{{.Provider}}-{{ timestamp }}.box", "type": "vagrant" @@ -84,4 +88,4 @@ "strip_path": true } ] -} \ No newline at end of file +} diff --git a/centos_esx.json b/centos_esx.json index f1a8f50..524c68d 100644 --- a/centos_esx.json +++ b/centos_esx.json @@ -23,52 +23,53 @@ "vm_ssh_username": "", "vm_vcpu": "" }, - "builders": [{ - "boot_command": [ - " {{ user `boot_command_prefix` }}=http://{{ .HTTPIP }}:{{ .HTTPPort }}/centos/ks.cfg " - ], - "disk_adapter_type": "{{ user ` vm_disk_adapter_type` }}", - "disk_size": "{{ user `vm_disk_size` }}", - "disk_type_id": "thin", - "guest_os_type": "{{ user `vm_guest_os_type` }}", - "http_directory": "http", - "iso_checksum_type": "{{ user `iso_checksum_type` }}", - "iso_checksum": "{{ user `iso_checksum` }}", - "iso_url": "{{ user `iso_url` }}", - "name": "{{ user `vm_name` }}-{{ timestamp }}", - "output_directory": "{{ user `vm_name` }}-{{ timestamp }}", - "remote_datastore": "{{ user `vcenter_datastore` }}", - "remote_host": "{{ user `esxi_remote_host` }}", - "remote_password": "{{ user `esxi_remote_password` }}", - "remote_type": "esx5", - "remote_username": "{{ user `esxi_remote_username` }}", - "shutdown_command": "echo '/sbin/halt -h -p' > shutdown.sh; echo 'packer'|sudo -S bash 'shutdown.sh'", - "ssh_password": "{{ user `vm_ssh_password` }}", - "ssh_username": "{{ user `vm_ssh_username` }}", - "ssh_wait_timeout": "60m", - "type": "vmware-iso", - "vm_name": "{{ user `vm_name` }}-{{ timestamp }}", - "vmx_data": { - "memsize": "{{ user `vm_memory` }}", - "numvcpus": "{{ user `vm_vcpu` }}", + "builders": [ + { + "boot_command": [ + " {{ user `boot_command_prefix` }}=http://{{ .HTTPIP }}:{{ .HTTPPort }}/centos/ks.cfg " + ], + "disk_adapter_type": "{{ user ` vm_disk_adapter_type` }}", + "disk_size": "{{ user `vm_disk_size` }}", + "disk_type_id": "thin", + "guest_os_type": "{{ user `vm_guest_os_type` }}", + "http_directory": "http", + "iso_checksum_type": "{{ user `iso_checksum_type` }}", + "iso_checksum": "{{ user `iso_checksum` }}", + "iso_url": "{{ user `iso_url` }}", + "name": "{{ user `vm_name` }}-{{ timestamp }}", + "output_directory": "{{ user `vm_name` }}-{{ timestamp }}", + "remote_datastore": "{{ user `vcenter_datastore` }}", + "remote_host": "{{ user `esxi_remote_host` }}", + "remote_password": "{{ user `esxi_remote_password` }}", + "remote_type": "esx5", + "remote_username": "{{ user `esxi_remote_username` }}", + "shutdown_command": "echo '/sbin/halt -h -p' > shutdown.sh; echo 'packer'|sudo -S bash 'shutdown.sh'", + "ssh_password": "{{ user `vm_ssh_password` }}", + "ssh_username": "{{ user `vm_ssh_username` }}", + "ssh_wait_timeout": "60m", + "type": "vmware-iso", + "vm_name": "{{ user `vm_name` }}-{{ timestamp }}", + "vmx_data": { + "memsize": "{{ user `vm_memory` }}", + "numvcpus": "{{ user `vm_vcpu` }}", - "ethernet0.networkName": "{{ user `vm_network` }}", - "ethernet0.present": "TRUE", - "ethernet0.startConnected": "TRUE", - "ethernet0.virtualDev": "vmxnet3", - "ethernet0.addressType": "generated", - "ethernet0.wakeOnPcktRcv": "FALSE" + "ethernet0.networkName": "{{ user `vm_network` }}", + "ethernet0.present": "TRUE", + "ethernet0.startConnected": "TRUE", + "ethernet0.virtualDev": "vmxnet3", + "ethernet0.addressType": "generated", + "ethernet0.wakeOnPcktRcv": "FALSE" + } + } + ], + "provisioners": [ + { + "type": "shell", + "scripts": ["scripts/base.sh", "scripts/vmware.sh", "scripts/cleanup.sh"] } - }], - "provisioners": [{ - "type": "shell", - "scripts": [ - "scripts/base.sh", - "scripts/vmware.sh", - "scripts/cleanup.sh" - ] - }], - "post-processors": [{ + ], + "post-processors": [ + { "datacenter": "{{ user `vcenter_datacenter` }}", "host": "{{ user `vcenter_host` }}", "insecure": "{{ user `vcenter_insecure`}}", @@ -82,4 +83,4 @@ "strip_path": true } ] -} \ No newline at end of file +} diff --git a/centos_fusion_esx.json b/centos_fusion_esx.json index 1c4acad..87ab8a7 100644 --- a/centos_fusion_esx.json +++ b/centos_fusion_esx.json @@ -21,39 +21,40 @@ "vm_ssh_username": "", "vm_vcpu": "" }, - "builders": [{ - "boot_command": [ - " {{ user `boot_command_prefix` }}=http://{{ .HTTPIP }}:{{ .HTTPPort }}/centos/ks.cfg " - ], - "disk_adapter_type": "{{ user ` vm_disk_adapter_type` }}", - "disk_size": "{{ user `vm_disk_size` }}", - "disk_type_id": 0, - "headless": true, - "http_directory": "http", - "iso_checksum_type": "{{ user `iso_checksum_type` }}", - "iso_checksum": "{{ user `iso_checksum` }}", - "iso_url": "{{ user `iso_url` }}", - "name": "{{ user `vm_name` }}-{{ timestamp }}", - "shutdown_command": "echo '/sbin/halt -h -p' > shutdown.sh; echo 'packer'|sudo -S bash 'shutdown.sh'", - "ssh_password": "{{ user `vm_ssh_password` }}", - "ssh_username": "{{ user `vm_ssh_username` }}", - "ssh_wait_timeout": "60m", - "type": "vmware-iso", - "vm_name": "{{ user `vm_name` }}-{{ timestamp }}", - "vmx_data": { - "memsize": "{{ user `vm_memory` }}", - "numvcpus": "{{ user `vm_vcpu` }}" + "builders": [ + { + "boot_command": [ + " {{ user `boot_command_prefix` }}=http://{{ .HTTPIP }}:{{ .HTTPPort }}/centos/ks.cfg " + ], + "disk_adapter_type": "{{ user ` vm_disk_adapter_type` }}", + "disk_size": "{{ user `vm_disk_size` }}", + "disk_type_id": 0, + "headless": true, + "http_directory": "http", + "iso_checksum_type": "{{ user `iso_checksum_type` }}", + "iso_checksum": "{{ user `iso_checksum` }}", + "iso_url": "{{ user `iso_url` }}", + "name": "{{ user `vm_name` }}-{{ timestamp }}", + "shutdown_command": "echo '/sbin/halt -h -p' > shutdown.sh; echo 'packer'|sudo -S bash 'shutdown.sh'", + "ssh_password": "{{ user `vm_ssh_password` }}", + "ssh_username": "{{ user `vm_ssh_username` }}", + "ssh_wait_timeout": "60m", + "type": "vmware-iso", + "vm_name": "{{ user `vm_name` }}-{{ timestamp }}", + "vmx_data": { + "memsize": "{{ user `vm_memory` }}", + "numvcpus": "{{ user `vm_vcpu` }}" + } } - }], - "provisioners": [{ - "type": "shell", - "scripts": [ - "scripts/base.sh", - "scripts/vmware.sh", - "scripts/cleanup.sh" - ] - }], - "post-processors": [{ + ], + "provisioners": [ + { + "type": "shell", + "scripts": ["scripts/base.sh", "scripts/vmware.sh", "scripts/cleanup.sh"] + } + ], + "post-processors": [ + { "cluster": "{{ user `vcenter_cluster` }}", "datacenter": "{{ user `vcenter_datacenter` }}", "datastore": "{{ user `vcenter_datastore` }}", @@ -80,4 +81,4 @@ "strip_path": true } ] -} \ No newline at end of file +} diff --git a/debian.json b/debian.json index 8678ac1..0927949 100644 --- a/debian.json +++ b/debian.json @@ -13,7 +13,8 @@ "vm_ssh_username": "", "vm_vcpu": "" }, - "builders": [{ + "builders": [ + { "boot_command": [ "{{ user `boot_command_prefix` }}", "install ", @@ -91,17 +92,20 @@ } } ], - "provisioners": [{ - "type": "shell", - "scripts": [ - "scripts/base.sh", - "scripts/vagrant.sh", - "scripts/virtualbox.sh", - "scripts/vmware.sh", - "scripts/cleanup.sh" - ] - }], - "post-processors": [{ + "provisioners": [ + { + "type": "shell", + "scripts": [ + "scripts/base.sh", + "scripts/vagrant.sh", + "scripts/virtualbox.sh", + "scripts/vmware.sh", + "scripts/cleanup.sh" + ] + } + ], + "post-processors": [ + { "compression_level": "{{ user `compression_level` }}", "output": "{{ user `vm_name` }}-{{.Provider}}-{{ timestamp }}.box", "type": "vagrant" @@ -112,4 +116,4 @@ "strip_path": true } ] -} \ No newline at end of file +} diff --git a/debian_esx.json b/debian_esx.json index 152f4fa..aca8bd5 100644 --- a/debian_esx.json +++ b/debian_esx.json @@ -23,66 +23,67 @@ "vm_ssh_username": "", "vm_vcpu": "" }, - "builders": [{ - "boot_command": [ - "{{ user `boot_command_prefix` }}", - "install ", - "preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/debian/preseed.cfg ", - "debian-installer=en_US ", - "auto ", - "locale=en_US ", - "kbd-chooser/method=us ", - "netcfg/get_domain=vm ", - "netcfg/get_hostname=packer ", - "fb=false ", - "debconf/frontend=noninteractive ", - "console-setup/ask_detect=false ", - "console-keymaps-at/keymap=us ", - "keyboard-configuration/xkb-keymap=us ", - "" - ], - "disk_adapter_type": "{{ user ` vm_disk_adapter_type` }}", - "disk_size": "{{ user `vm_disk_size` }}", - "disk_type_id": "thin", - "guest_os_type": "{{ user `vm_guest_os_type` }}", - "http_directory": "http", - "iso_checksum_type": "{{ user `iso_checksum_type` }}", - "iso_checksum": "{{ user `iso_checksum` }}", - "iso_url": "{{ user `iso_url` }}", - "name": "{{ user `vm_name` }}-{{ timestamp }}", - "output_directory": "{{ user `vm_name` }}-{{ timestamp }}", - "remote_datastore": "{{ user `vcenter_datastore` }}", - "remote_host": "{{ user `esxi_remote_host` }}", - "remote_password": "{{ user `esxi_remote_password` }}", - "remote_type": "esx5", - "remote_username": "{{ user `esxi_remote_username` }}", - "shutdown_command": "echo '/sbin/halt -h -p' > shutdown.sh; echo 'packer'|sudo -S bash 'shutdown.sh'", - "ssh_password": "{{ user `vm_ssh_password` }}", - "ssh_username": "{{ user `vm_ssh_username` }}", - "ssh_wait_timeout": "60m", - "type": "vmware-iso", - "vm_name": "{{ user `vm_name` }}-{{ timestamp }}", - "vmx_data": { - "memsize": "{{ user `vm_memory` }}", - "numvcpus": "{{ user `vm_vcpu` }}", + "builders": [ + { + "boot_command": [ + "{{ user `boot_command_prefix` }}", + "install ", + "preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/debian/preseed.cfg ", + "debian-installer=en_US ", + "auto ", + "locale=en_US ", + "kbd-chooser/method=us ", + "netcfg/get_domain=vm ", + "netcfg/get_hostname=packer ", + "fb=false ", + "debconf/frontend=noninteractive ", + "console-setup/ask_detect=false ", + "console-keymaps-at/keymap=us ", + "keyboard-configuration/xkb-keymap=us ", + "" + ], + "disk_adapter_type": "{{ user ` vm_disk_adapter_type` }}", + "disk_size": "{{ user `vm_disk_size` }}", + "disk_type_id": "thin", + "guest_os_type": "{{ user `vm_guest_os_type` }}", + "http_directory": "http", + "iso_checksum_type": "{{ user `iso_checksum_type` }}", + "iso_checksum": "{{ user `iso_checksum` }}", + "iso_url": "{{ user `iso_url` }}", + "name": "{{ user `vm_name` }}-{{ timestamp }}", + "output_directory": "{{ user `vm_name` }}-{{ timestamp }}", + "remote_datastore": "{{ user `vcenter_datastore` }}", + "remote_host": "{{ user `esxi_remote_host` }}", + "remote_password": "{{ user `esxi_remote_password` }}", + "remote_type": "esx5", + "remote_username": "{{ user `esxi_remote_username` }}", + "shutdown_command": "echo '/sbin/halt -h -p' > shutdown.sh; echo 'packer'|sudo -S bash 'shutdown.sh'", + "ssh_password": "{{ user `vm_ssh_password` }}", + "ssh_username": "{{ user `vm_ssh_username` }}", + "ssh_wait_timeout": "60m", + "type": "vmware-iso", + "vm_name": "{{ user `vm_name` }}-{{ timestamp }}", + "vmx_data": { + "memsize": "{{ user `vm_memory` }}", + "numvcpus": "{{ user `vm_vcpu` }}", - "ethernet0.networkName": "{{ user `vm_network` }}", - "ethernet0.present": "TRUE", - "ethernet0.startConnected": "TRUE", - "ethernet0.virtualDev": "vmxnet3", - "ethernet0.addressType": "generated", - "ethernet0.wakeOnPcktRcv": "FALSE" + "ethernet0.networkName": "{{ user `vm_network` }}", + "ethernet0.present": "TRUE", + "ethernet0.startConnected": "TRUE", + "ethernet0.virtualDev": "vmxnet3", + "ethernet0.addressType": "generated", + "ethernet0.wakeOnPcktRcv": "FALSE" + } + } + ], + "provisioners": [ + { + "type": "shell", + "scripts": ["scripts/base.sh", "scripts/vmware.sh", "scripts/cleanup.sh"] } - }], - "provisioners": [{ - "type": "shell", - "scripts": [ - "scripts/base.sh", - "scripts/vmware.sh", - "scripts/cleanup.sh" - ] - }], - "post-processors": [{ + ], + "post-processors": [ + { "datacenter": "{{ user `vcenter_datacenter` }}", "host": "{{ user `vcenter_host` }}", "insecure": "{{ user `vcenter_insecure`}}", @@ -96,4 +97,4 @@ "strip_path": true } ] -} \ No newline at end of file +} diff --git a/ubuntu.json b/ubuntu.json index b6673f5..287f139 100644 --- a/ubuntu.json +++ b/ubuntu.json @@ -13,7 +13,8 @@ "vm_ssh_username": "", "vm_vcpu": "" }, - "builders": [{ + "builders": [ + { "boot_command": [ "{{ user `boot_command_prefix` }}", "/install/vmlinuz ", @@ -103,17 +104,20 @@ } } ], - "provisioners": [{ - "type": "shell", - "scripts": [ - "scripts/base.sh", - "scripts/vagrant.sh", - "scripts/virtualbox.sh", - "scripts/vmware.sh", - "scripts/cleanup.sh" - ] - }], - "post-processors": [{ + "provisioners": [ + { + "type": "shell", + "scripts": [ + "scripts/base.sh", + "scripts/vagrant.sh", + "scripts/virtualbox.sh", + "scripts/vmware.sh", + "scripts/cleanup.sh" + ] + } + ], + "post-processors": [ + { "compression_level": "{{ user `compression_level` }}", "output": "{{ user `vm_name` }}-{{.Provider}}-{{ timestamp }}.box", "type": "vagrant" @@ -124,4 +128,4 @@ "strip_path": true } ] -} \ No newline at end of file +} diff --git a/ubuntu1204.json b/ubuntu1204.json index 4f9316d..a7405c6 100644 --- a/ubuntu1204.json +++ b/ubuntu1204.json @@ -4,4 +4,4 @@ "iso_checksum_type": "sha256", "iso_url": "http://mirror.pnl.gov/releases/12.04/ubuntu-12.04.5-server-amd64.iso", "vm_name": "ubuntu1204-packer-template" -} \ No newline at end of file +} diff --git a/ubuntu1404.json b/ubuntu1404.json index 795b413..bc04304 100644 --- a/ubuntu1404.json +++ b/ubuntu1404.json @@ -4,4 +4,4 @@ "iso_checksum_type": "sha256", "iso_url": "http://mirror.pnl.gov/releases/14.04/ubuntu-14.04.5-server-amd64.iso", "vm_name": "ubuntu1404-packer-template" -} \ No newline at end of file +} diff --git a/ubuntu_esx.json b/ubuntu_esx.json index 37b9dbb..05a899a 100644 --- a/ubuntu_esx.json +++ b/ubuntu_esx.json @@ -23,72 +23,73 @@ "vm_ssh_username": "", "vm_vcpu": "" }, - "builders": [{ - "boot_command": [ - "{{ user `boot_command_prefix` }}", - "/install/vmlinuz ", - "auto ", - "console-setup/ask_detect=false ", - "console-setup/layoutcode=us ", - "console-setup/modelcode=pc105 ", - "debconf/frontend=noninteractive ", - "debian-installer=en_US ", - "fb=false ", - "initrd=/install/initrd.gz ", - "kbd-chooser/method=us ", - "keyboard-configuration/layout=USA ", - "keyboard-configuration/variant=USA ", - "locale=en_US ", - "netcfg/get_domain=vm ", - "netcfg/get_hostname=packer ", - "grub-installer/bootdev=/dev/sda ", - "noapic ", - "preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ubuntu/preseed.cfg ", - "-- ", - "" - ], - "disk_adapter_type": "{{ user ` vm_disk_adapter_type` }}", - "disk_size": "{{ user `vm_disk_size` }}", - "disk_type_id": "thin", - "guest_os_type": "{{ user `vm_guest_os_type` }}", - "http_directory": "http", - "iso_checksum_type": "{{ user `iso_checksum_type` }}", - "iso_checksum": "{{ user `iso_checksum` }}", - "iso_url": "{{ user `iso_url` }}", - "name": "{{ user `vm_name` }}-{{ timestamp }}", - "output_directory": "{{ user `vm_name` }}-{{ timestamp }}", - "remote_datastore": "{{ user `vcenter_datastore` }}", - "remote_host": "{{ user `esxi_remote_host` }}", - "remote_password": "{{ user `esxi_remote_password` }}", - "remote_type": "esx5", - "remote_username": "{{ user `esxi_remote_username` }}", - "shutdown_command": "echo '/sbin/halt -h -p' > shutdown.sh; echo 'packer'|sudo -S bash 'shutdown.sh'", - "ssh_password": "{{ user `vm_ssh_password` }}", - "ssh_username": "{{ user `vm_ssh_username` }}", - "ssh_wait_timeout": "60m", - "type": "vmware-iso", - "vm_name": "{{ user `vm_name` }}-{{ timestamp }}", - "vmx_data": { - "memsize": "{{ user `vm_memory` }}", - "numvcpus": "{{ user `vm_vcpu` }}", + "builders": [ + { + "boot_command": [ + "{{ user `boot_command_prefix` }}", + "/install/vmlinuz ", + "auto ", + "console-setup/ask_detect=false ", + "console-setup/layoutcode=us ", + "console-setup/modelcode=pc105 ", + "debconf/frontend=noninteractive ", + "debian-installer=en_US ", + "fb=false ", + "initrd=/install/initrd.gz ", + "kbd-chooser/method=us ", + "keyboard-configuration/layout=USA ", + "keyboard-configuration/variant=USA ", + "locale=en_US ", + "netcfg/get_domain=vm ", + "netcfg/get_hostname=packer ", + "grub-installer/bootdev=/dev/sda ", + "noapic ", + "preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ubuntu/preseed.cfg ", + "-- ", + "" + ], + "disk_adapter_type": "{{ user ` vm_disk_adapter_type` }}", + "disk_size": "{{ user `vm_disk_size` }}", + "disk_type_id": "thin", + "guest_os_type": "{{ user `vm_guest_os_type` }}", + "http_directory": "http", + "iso_checksum_type": "{{ user `iso_checksum_type` }}", + "iso_checksum": "{{ user `iso_checksum` }}", + "iso_url": "{{ user `iso_url` }}", + "name": "{{ user `vm_name` }}-{{ timestamp }}", + "output_directory": "{{ user `vm_name` }}-{{ timestamp }}", + "remote_datastore": "{{ user `vcenter_datastore` }}", + "remote_host": "{{ user `esxi_remote_host` }}", + "remote_password": "{{ user `esxi_remote_password` }}", + "remote_type": "esx5", + "remote_username": "{{ user `esxi_remote_username` }}", + "shutdown_command": "echo '/sbin/halt -h -p' > shutdown.sh; echo 'packer'|sudo -S bash 'shutdown.sh'", + "ssh_password": "{{ user `vm_ssh_password` }}", + "ssh_username": "{{ user `vm_ssh_username` }}", + "ssh_wait_timeout": "60m", + "type": "vmware-iso", + "vm_name": "{{ user `vm_name` }}-{{ timestamp }}", + "vmx_data": { + "memsize": "{{ user `vm_memory` }}", + "numvcpus": "{{ user `vm_vcpu` }}", - "ethernet0.networkName": "{{ user `vm_network` }}", - "ethernet0.present": "TRUE", - "ethernet0.startConnected": "TRUE", - "ethernet0.virtualDev": "vmxnet3", - "ethernet0.addressType": "generated", - "ethernet0.wakeOnPcktRcv": "FALSE" + "ethernet0.networkName": "{{ user `vm_network` }}", + "ethernet0.present": "TRUE", + "ethernet0.startConnected": "TRUE", + "ethernet0.virtualDev": "vmxnet3", + "ethernet0.addressType": "generated", + "ethernet0.wakeOnPcktRcv": "FALSE" + } + } + ], + "provisioners": [ + { + "type": "shell", + "scripts": ["scripts/base.sh", "scripts/vmware.sh", "scripts/cleanup.sh"] } - }], - "provisioners": [{ - "type": "shell", - "scripts": [ - "scripts/base.sh", - "scripts/vmware.sh", - "scripts/cleanup.sh" - ] - }], - "post-processors": [{ + ], + "post-processors": [ + { "datacenter": "{{ user `vcenter_datacenter` }}", "host": "{{ user `vcenter_host` }}", "insecure": "{{ user `vcenter_insecure`}}", @@ -102,4 +103,4 @@ "strip_path": true } ] -} \ No newline at end of file +} diff --git a/ubuntu_fusion_esx.json b/ubuntu_fusion_esx.json index 502785b..da3763c 100644 --- a/ubuntu_fusion_esx.json +++ b/ubuntu_fusion_esx.json @@ -21,59 +21,60 @@ "vm_ssh_username": "", "vm_vcpu": "" }, - "builders": [{ - "boot_command": [ - "{{ user `boot_command_prefix` }}", - "/install/vmlinuz ", - "auto ", - "console-setup/ask_detect=false ", - "console-setup/layoutcode=us ", - "console-setup/modelcode=pc105 ", - "debconf/frontend=noninteractive ", - "debian-installer=en_US ", - "fb=false ", - "initrd=/install/initrd.gz ", - "kbd-chooser/method=us ", - "keyboard-configuration/layout=USA ", - "keyboard-configuration/variant=USA ", - "locale=en_US ", - "netcfg/get_domain=vm ", - "netcfg/get_hostname=packer ", - "grub-installer/bootdev=/dev/sda ", - "noapic ", - "preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ubuntu/preseed.cfg ", - "-- ", - "" - ], - "disk_adapter_type": "{{ user ` vm_disk_adapter_type` }}", - "disk_size": "{{ user `vm_disk_size` }}", - "disk_type_id": 0, - "headless": true, - "http_directory": "http", - "iso_checksum_type": "{{ user `iso_checksum_type` }}", - "iso_checksum": "{{ user `iso_checksum` }}", - "iso_url": "{{ user `iso_url` }}", - "name": "{{ user `vm_name` }}-{{ timestamp }}", - "shutdown_command": "echo '/sbin/halt -h -p' > shutdown.sh; echo 'packer'|sudo -S bash 'shutdown.sh'", - "ssh_password": "{{ user `vm_ssh_password` }}", - "ssh_username": "{{ user `vm_ssh_username` }}", - "ssh_wait_timeout": "60m", - "type": "vmware-iso", - "vm_name": "{{ user `vm_name` }}-{{ timestamp }}", - "vmx_data": { - "memsize": "{{ user `vm_memory` }}", - "numvcpus": "{{ user `vm_vcpu` }}" + "builders": [ + { + "boot_command": [ + "{{ user `boot_command_prefix` }}", + "/install/vmlinuz ", + "auto ", + "console-setup/ask_detect=false ", + "console-setup/layoutcode=us ", + "console-setup/modelcode=pc105 ", + "debconf/frontend=noninteractive ", + "debian-installer=en_US ", + "fb=false ", + "initrd=/install/initrd.gz ", + "kbd-chooser/method=us ", + "keyboard-configuration/layout=USA ", + "keyboard-configuration/variant=USA ", + "locale=en_US ", + "netcfg/get_domain=vm ", + "netcfg/get_hostname=packer ", + "grub-installer/bootdev=/dev/sda ", + "noapic ", + "preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ubuntu/preseed.cfg ", + "-- ", + "" + ], + "disk_adapter_type": "{{ user ` vm_disk_adapter_type` }}", + "disk_size": "{{ user `vm_disk_size` }}", + "disk_type_id": 0, + "headless": true, + "http_directory": "http", + "iso_checksum_type": "{{ user `iso_checksum_type` }}", + "iso_checksum": "{{ user `iso_checksum` }}", + "iso_url": "{{ user `iso_url` }}", + "name": "{{ user `vm_name` }}-{{ timestamp }}", + "shutdown_command": "echo '/sbin/halt -h -p' > shutdown.sh; echo 'packer'|sudo -S bash 'shutdown.sh'", + "ssh_password": "{{ user `vm_ssh_password` }}", + "ssh_username": "{{ user `vm_ssh_username` }}", + "ssh_wait_timeout": "60m", + "type": "vmware-iso", + "vm_name": "{{ user `vm_name` }}-{{ timestamp }}", + "vmx_data": { + "memsize": "{{ user `vm_memory` }}", + "numvcpus": "{{ user `vm_vcpu` }}" + } } - }], - "provisioners": [{ - "type": "shell", - "scripts": [ - "scripts/base.sh", - "scripts/vmware.sh", - "scripts/cleanup.sh" - ] - }], - "post-processors": [{ + ], + "provisioners": [ + { + "type": "shell", + "scripts": ["scripts/base.sh", "scripts/vmware.sh", "scripts/cleanup.sh"] + } + ], + "post-processors": [ + { "cluster": "{{ user `vcenter_cluster` }}", "datacenter": "{{ user `vcenter_datacenter` }}", "datastore": "{{ user `vcenter_datastore` }}", @@ -100,4 +101,4 @@ "strip_path": true } ] -} \ No newline at end of file +} diff --git a/ubuntu_kvm.json b/ubuntu_kvm.json index e58087e..a6034f6 100644 --- a/ubuntu_kvm.json +++ b/ubuntu_kvm.json @@ -12,61 +12,64 @@ "vm_vcpu": "", "vnc_bind_address": "0.0.0.0" }, - "builders": [{ - "boot_command": [ - "{{ user `boot_command_prefix` }}", - "/install/vmlinuz ", - "auto ", - "console-setup/ask_detect=false ", - "console-setup/layoutcode=us ", - "console-setup/modelcode=pc105 ", - "debconf/frontend=noninteractive ", - "debian-installer=en_US ", - "fb=false ", - "initrd=/install/initrd.gz ", - "kbd-chooser/method=us ", - "keyboard-configuration/layout=USA ", - "keyboard-configuration/variant=USA ", - "locale=en_US ", - "netcfg/get_domain=vm ", - "netcfg/get_hostname=packer ", - "grub-installer/bootdev=/dev/vda ", - "noapic ", - "preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ubuntu/preseed.cfg ", - "-- ", - "" - ], - "disk_size": "{{ user `vm_disk_size` }}", - "format": "qcow2", - "headless": true, - "http_directory": "http", - "iso_checksum_type": "{{ user `iso_checksum_type` }}", - "iso_checksum": "{{ user `iso_checksum` }}", - "iso_url": "{{ user `iso_url` }}", - "name": "{{ user `vm_name` }}-{{ timestamp }}", - "output_directory": "{{ user `vm_name` }}-{{ timestamp }}", - "qemuargs": [ - ["-m", "{{ user `vm_memory` }}"], - ["-smp", "{{ user `vm_vcpu` }}"] - ], - "shutdown_command": "echo '/sbin/halt -h -p' > shutdown.sh; echo 'packer'|sudo -S bash 'shutdown.sh'", - "ssh_password": "{{ user `vm_ssh_password` }}", - "ssh_username": "{{ user `vm_ssh_username` }}", - "ssh_wait_timeout": "60m", - "type": "qemu", - "vm_name": "{{ user `vm_name` }}-{{ timestamp }}", - "vnc_bind_address": "{{ user `vnc_bind_address` }}" - }], - "provisioners": [{ - "type": "shell", - "scripts": [ - "scripts/base.sh", - "scripts/cleanup.sh" - ] - }], - "post-processors": [{ - "type": "manifest", - "output": "manifest.json", - "strip_path": true - }] -} \ No newline at end of file + "builders": [ + { + "boot_command": [ + "{{ user `boot_command_prefix` }}", + "/install/vmlinuz ", + "auto ", + "console-setup/ask_detect=false ", + "console-setup/layoutcode=us ", + "console-setup/modelcode=pc105 ", + "debconf/frontend=noninteractive ", + "debian-installer=en_US ", + "fb=false ", + "initrd=/install/initrd.gz ", + "kbd-chooser/method=us ", + "keyboard-configuration/layout=USA ", + "keyboard-configuration/variant=USA ", + "locale=en_US ", + "netcfg/get_domain=vm ", + "netcfg/get_hostname=packer ", + "grub-installer/bootdev=/dev/vda ", + "noapic ", + "preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ubuntu/preseed.cfg ", + "-- ", + "" + ], + "disk_size": "{{ user `vm_disk_size` }}", + "format": "qcow2", + "headless": true, + "http_directory": "http", + "iso_checksum_type": "{{ user `iso_checksum_type` }}", + "iso_checksum": "{{ user `iso_checksum` }}", + "iso_url": "{{ user `iso_url` }}", + "name": "{{ user `vm_name` }}-{{ timestamp }}", + "output_directory": "{{ user `vm_name` }}-{{ timestamp }}", + "qemuargs": [ + ["-m", "{{ user `vm_memory` }}"], + ["-smp", "{{ user `vm_vcpu` }}"] + ], + "shutdown_command": "echo '/sbin/halt -h -p' > shutdown.sh; echo 'packer'|sudo -S bash 'shutdown.sh'", + "ssh_password": "{{ user `vm_ssh_password` }}", + "ssh_username": "{{ user `vm_ssh_username` }}", + "ssh_wait_timeout": "60m", + "type": "qemu", + "vm_name": "{{ user `vm_name` }}-{{ timestamp }}", + "vnc_bind_address": "{{ user `vnc_bind_address` }}" + } + ], + "provisioners": [ + { + "type": "shell", + "scripts": ["scripts/base.sh", "scripts/cleanup.sh"] + } + ], + "post-processors": [ + { + "type": "manifest", + "output": "manifest.json", + "strip_path": true + } + ] +}