Created
January 13, 2017 19:34
-
-
Save spuder/8b34a0da9f180109c0eda2eb89846030 to your computer and use it in GitHub Desktop.
bento packer config that makes single vmdk
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"builders": [ | |
{ | |
"boot_command": [ | |
"<enter><wait><f6><esc><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>", | |
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>", | |
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>", | |
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>", | |
"/install/vmlinuz<wait>", | |
" auto<wait>", | |
" console-setup/ask_detect=false<wait>", | |
" console-setup/layoutcode=us<wait>", | |
" console-setup/modelcode=pc105<wait>", | |
" debconf/frontend=noninteractive<wait>", | |
" debian-installer=en_US.UTF-8<wait>", | |
" fb=false<wait>", | |
" initrd=/install/initrd.gz<wait>", | |
" kbd-chooser/method=us<wait>", | |
" keyboard-configuration/layout=USA<wait>", | |
" keyboard-configuration/variant=USA<wait>", | |
" locale=en_US.UTF-8<wait>", | |
" netcfg/get_domain=vm<wait>", | |
" netcfg/get_hostname=vagrant<wait>", | |
" grub-installer/bootdev=/dev/sda<wait>", | |
" noapic<wait>", | |
" preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{user `preseed_path`}}<wait>", | |
" -- <wait>", | |
"<enter><wait>" | |
], | |
"boot_wait": "10s", | |
"disk_size": "{{user `disk_size`}}", | |
"guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso", | |
"guest_os_type": "Ubuntu_64", | |
"hard_drive_interface": "sata", | |
"headless": "{{ user `headless` }}", | |
"http_directory": "http", | |
"iso_checksum": "{{user `iso_checksum`}}", | |
"iso_checksum_type": "{{user `iso_checksum_type`}}", | |
"iso_url": "{{user `mirror`}}/{{user `mirror_directory`}}/{{user `iso_name`}}", | |
"output_directory": "packer-{{user `template`}}-virtualbox", | |
"shutdown_command": "echo 'vagrant' | sudo -S shutdown -P now", | |
"ssh_password": "vagrant", | |
"ssh_port": 22, | |
"ssh_username": "vagrant", | |
"ssh_wait_timeout": "10000s", | |
"type": "virtualbox-iso", | |
"vboxmanage": [ | |
[ | |
"modifyvm", | |
"{{.Name}}", | |
"--memory", | |
"{{ user `memory` }}" | |
], | |
[ | |
"modifyvm", | |
"{{.Name}}", | |
"--cpus", | |
"{{ user `cpus` }}" | |
] | |
], | |
"virtualbox_version_file": ".vbox_version", | |
"vm_name": "{{ user `template` }}" | |
}, | |
{ | |
"boot_command": [ | |
"<enter><wait><f6><esc><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>", | |
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>", | |
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>", | |
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>", | |
"/install/vmlinuz<wait>", | |
" auto<wait>", | |
" console-setup/ask_detect=false<wait>", | |
" console-setup/layoutcode=us<wait>", | |
" console-setup/modelcode=pc105<wait>", | |
" debconf/frontend=noninteractive<wait>", | |
" debian-installer=en_US.UTF-8<wait>", | |
" fb=false<wait>", | |
" initrd=/install/initrd.gz<wait>", | |
" kbd-chooser/method=us<wait>", | |
" keyboard-configuration/layout=USA<wait>", | |
" keyboard-configuration/variant=USA<wait>", | |
" locale=en_US.UTF-8<wait>", | |
" netcfg/get_domain=vm<wait>", | |
" netcfg/get_hostname=vagrant<wait>", | |
" grub-installer/bootdev=/dev/sda<wait>", | |
" noapic<wait>", | |
" preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{user `preseed_path`}}<wait>", | |
" -- <wait>", | |
"<enter><wait>" | |
], | |
"boot_wait": "10s", | |
"disk_size": "{{user `disk_size`}}", | |
"disk_type_id": "0", | |
"guest_os_type": "ubuntu-64", | |
"headless": "{{ user `headless` }}", | |
"http_directory": "http", | |
"iso_checksum": "{{user `iso_checksum`}}", | |
"iso_checksum_type": "{{user `iso_checksum_type`}}", | |
"iso_url": "{{user `mirror`}}/{{user `mirror_directory`}}/{{user `iso_name`}}", | |
"output_directory": "packer-{{user `template`}}-vmware", | |
"shutdown_command": "echo 'vagrant' | sudo -S shutdown -P now", | |
"ssh_password": "vagrant", | |
"ssh_port": 22, | |
"ssh_username": "vagrant", | |
"ssh_wait_timeout": "10000s", | |
"tools_upload_flavor": "linux", | |
"type": "vmware-iso", | |
"vm_name": "{{ user `template` }}", | |
"vmx_data": { | |
"cpuid.coresPerSocket": "1", | |
"ethernet0.pciSlotNumber": "32", | |
"memsize": "{{ user `memory` }}", | |
"numvcpus": "{{ user `cpus` }}" | |
} | |
}, | |
{ | |
"boot_command": [ | |
"<enter><wait><f6><esc><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>", | |
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>", | |
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>", | |
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>", | |
"/install/vmlinuz<wait>", | |
" auto<wait>", | |
" console-setup/ask_detect=false<wait>", | |
" console-setup/layoutcode=us<wait>", | |
" console-setup/modelcode=pc105<wait>", | |
" debconf/frontend=noninteractive<wait>", | |
" debian-installer=en_US.UTF-8<wait>", | |
" fb=false<wait>", | |
" initrd=/install/initrd.gz<wait>", | |
" kbd-chooser/method=us<wait>", | |
" keyboard-configuration/layout=USA<wait>", | |
" keyboard-configuration/variant=USA<wait>", | |
" locale=en_US.UTF-8<wait>", | |
" netcfg/get_domain=vm<wait>", | |
" netcfg/get_hostname=vagrant<wait>", | |
" grub-installer/bootdev=/dev/sda<wait>", | |
" noapic<wait>", | |
" preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{user `preseed_path`}}<wait>", | |
" -- <wait>", | |
"<enter><wait>" | |
], | |
"boot_wait": "10s", | |
"disk_size": "{{user `disk_size`}}", | |
"guest_os_type": "ubuntu", | |
"http_directory": "http", | |
"iso_checksum": "{{user `iso_checksum`}}", | |
"iso_checksum_type": "{{user `iso_checksum_type`}}", | |
"iso_url": "{{user `mirror`}}/{{user `mirror_directory`}}/{{user `iso_name`}}", | |
"output_directory": "packer-{{user `template`}}-parallels", | |
"parallels_tools_flavor": "lin", | |
"prlctl": [ | |
[ | |
"set", | |
"{{.Name}}", | |
"--memsize", | |
"{{ user `memory` }}" | |
], | |
[ | |
"set", | |
"{{.Name}}", | |
"--cpus", | |
"{{ user `cpus` }}" | |
] | |
], | |
"prlctl_version_file": ".prlctl_version", | |
"shutdown_command": "echo 'vagrant' | sudo -S shutdown -P now", | |
"ssh_password": "vagrant", | |
"ssh_port": 22, | |
"ssh_username": "vagrant", | |
"ssh_wait_timeout": "10000s", | |
"type": "parallels-iso", | |
"vm_name": "{{ user `template` }}" | |
}, | |
{ | |
"boot_command": [ | |
"<enter><wait><f6><esc><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>", | |
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>", | |
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>", | |
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>", | |
"/install/vmlinuz<wait>", | |
" auto<wait>", | |
" console-setup/ask_detect=false<wait>", | |
" console-setup/layoutcode=us<wait>", | |
" console-setup/modelcode=pc105<wait>", | |
" debconf/frontend=noninteractive<wait>", | |
" debian-installer=en_US.UTF-8<wait>", | |
" fb=false<wait>", | |
" initrd=/install/initrd.gz<wait>", | |
" kbd-chooser/method=us<wait>", | |
" keyboard-configuration/layout=USA<wait>", | |
" keyboard-configuration/variant=USA<wait>", | |
" locale=en_US.UTF-8<wait>", | |
" netcfg/get_domain=vm<wait>", | |
" netcfg/get_hostname=vagrant<wait>", | |
" grub-installer/bootdev=/dev/vda<wait>", | |
" noapic<wait>", | |
" preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{user `preseed_path`}}<wait>", | |
" -- <wait>", | |
"<enter><wait>" | |
], | |
"boot_wait": "10s", | |
"disk_size": "{{user `disk_size`}}", | |
"headless": "{{ user `headless` }}", | |
"http_directory": "http", | |
"iso_checksum": "{{user `iso_checksum`}}", | |
"iso_checksum_type": "{{user `iso_checksum_type`}}", | |
"iso_url": "{{user `mirror`}}/{{user `mirror_directory`}}/{{user `iso_name`}}", | |
"output_directory": "packer-{{user `template`}}-qemu", | |
"shutdown_command": "echo 'vagrant'|sudo -S shutdown -P now", | |
"ssh_password": "vagrant", | |
"ssh_port": 22, | |
"ssh_username": "vagrant", | |
"ssh_wait_timeout": "10000s", | |
"type": "qemu", | |
"vm_name": "{{ user `template` }}" | |
} | |
], | |
"post-processors": [ | |
{ | |
"output": "builds/{{user `box_basename`}}.{{.Provider}}.box", | |
"keep_input_artifact": true, | |
"type": "vagrant" | |
} | |
], | |
"provisioners": [ | |
{ | |
"destination": "/tmp/bento-metadata.json", | |
"source": "{{user `metadata`}}", | |
"type": "file" | |
}, | |
{ | |
"environment_vars": [ | |
"HOME_DIR=/home/vagrant", | |
"http_proxy={{user `http_proxy`}}", | |
"https_proxy={{user `https_proxy`}}", | |
"no_proxy={{user `no_proxy`}}" | |
], | |
"execute_command": "echo 'vagrant' | {{.Vars}} sudo -S -E sh -eux '{{.Path}}'", | |
"scripts": [ | |
"scripts/common/metadata.sh", | |
"scripts/ubuntu/update.sh", | |
"scripts/common/sshd.sh", | |
"scripts/ubuntu/networking.sh", | |
"scripts/ubuntu/sudoers.sh", | |
"scripts/ubuntu/vagrant.sh", | |
"scripts/common/virtualbox.sh", | |
"scripts/ubuntu/vmware.sh", | |
"scripts/common/parallels.sh", | |
"scripts/ubuntu/cleanup.sh", | |
"scripts/common/minimize.sh" | |
], | |
"type": "shell" | |
} | |
], | |
"variables": { | |
"box_basename": "ubuntu-16.04", | |
"build_timestamp": "{{isotime \"20060102150405\"}}", | |
"cpus": "1", | |
"disk_size": "40960", | |
"git_revision": "__unknown_git_revision__", | |
"headless": "", | |
"http_proxy": "{{env `http_proxy`}}", | |
"https_proxy": "{{env `https_proxy`}}", | |
"iso_checksum": "29a8b9009509b39d542ecb229787cdf48f05e739a932289de9e9858d7c487c80", | |
"iso_checksum_type": "sha256", | |
"iso_name": "ubuntu-16.04.1-server-amd64.iso", | |
"memory": "512", | |
"metadata": "floppy/dummy_metadata.json", | |
"mirror": "http://releases.ubuntu.com", | |
"mirror_directory": "16.04", | |
"name": "ubuntu-16.04", | |
"no_proxy": "{{env `no_proxy`}}", | |
"preseed_path": "ubuntu-15.10/preseed.cfg", | |
"template": "ubuntu-16.04-amd64", | |
"version": "2.1.TIMESTAMP" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment