Skip to content

Instantly share code, notes, and snippets.

@williamsjj
Last active December 26, 2015 19:29
Show Gist options
  • Save williamsjj/7201661 to your computer and use it in GitHub Desktop.
Save williamsjj/7201661 to your computer and use it in GitHub Desktop.
{
"provisioners": [
{
"type": "shell",
"scripts" : [
"scripts/vbox.sh"
],
"override": {
"virtualbox": {
"execute_command": "echo 'vagrant'|sudo -S sh '{{.Path}}'"
}
},
"only" : ["virtualbox"]
},
{
"type": "shell",
"scripts": [
"scripts/postinstall.sh"
],
"override": {
"virtualbox": {
"execute_command": "echo 'vagrant'|sudo -S sh '{{.Path}}'"
},
"vmware": {
"execute_command": "echo 'vagrant'|sudo -S sh '{{.Path}}'"
}
}
}
],
"builders": [
{
"type": "virtualbox",
"boot_command": [
"<esc><esc><enter><wait>",
"/install/vmlinuz <wait>",
"noapic <wait>",
"auto-install/enable<wait>",
"console-setup/ask_detect=false <wait>",
"console-setup/modelcode=pc105 <wait>",
"console-setup/layoutcode=us <wait>",
"debconf/priority=critical <wait>",
"debconf/frontend=noninteractive <wait>",
"debian-installer=en_US <wait>",
"debian-installer/locale=en_US <wait>",
"debian-installer/framebuffer=false <wait>",
"initrd=/install/initrd.gz <wait>",
"kbd-chooser/method=us <wait>",
"netcfg/get_hostname={{ .Name }} <wait>",
"netcfg/dhcp_timeout=60 <wait>",
"netcfg/choose_interface=auto <wait>",
"preseed/interactive=false <wait>",
"preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg <wait>",
"preseed/url/checksum=c93195c116cce253bd75fb6d5f14f972 <wait>",
"DEBCONF_DEBUG=5 <wait>",
"-- <enter><wait>"
],
"boot_wait": "10s",
"disk_size": 15360,
"guest_os_type": "Ubuntu_64",
"http_directory": "http",
"iso_checksum": "9b218654cdcdf9722171648c52f8a088",
"iso_checksum_type": "md5",
"iso_url": "http://mirror.us.leaseweb.net/ubuntu-releases/10.04.4/ubuntu-10.04.4-server-amd64.iso",
"ssh_username": "vagrant",
"ssh_password": "vagrant",
"ssh_port": 22,
"ssh_wait_timeout": "1000s",
"shutdown_command": "echo 'shutdown -h now' > shutdown.sh; echo 'vagrant'|sudo -S sh 'shutdown.sh'",
"guest_additions_path": "/tmp/VBoxGuestAdditions.iso",
"virtualbox_version_file": ".vbox_version",
"vm_name" : "co-ubuntu10.04x64",
"vboxmanage": [
[
"modifyvm",
"{{.Name}}",
"--memory",
"512"
],
[
"modifyvm",
"{{.Name}}",
"--cpus",
"1"
]
]
},
{
"type": "vmware",
"boot_command": [
"<esc><esc><enter><wait>",
"/install/vmlinuz <wait>",
"noapic <wait>",
"auto-install/enable<wait>",
"console-setup/ask_detect=false <wait>",
"console-setup/modelcode=pc105 <wait>",
"console-setup/layoutcode=us <wait>",
"debconf/priority=critical <wait>",
"debconf/frontend=noninteractive <wait>",
"debian-installer=en_US <wait>",
"debian-installer/locale=en_US <wait>",
"debian-installer/framebuffer=false <wait>",
"initrd=/install/initrd.gz <wait>",
"kbd-chooser/method=us <wait>",
"netcfg/get_hostname={{ .Name }} <wait>",
"netcfg/dhcp_timeout=60 <wait>",
"netcfg/choose_interface=auto <wait>",
"preseed/interactive=false <wait>",
"preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg <wait>",
"preseed/url/checksum=c93195c116cce253bd75fb6d5f14f972 <wait>",
"DEBCONF_DEBUG=5 <wait>",
"-- <enter><wait>"
],
"boot_wait": "10s",
"disk_size": 15360,
"guest_os_type": "ubuntu-64",
"tools_upload_flavor": "linux",
"tools_upload_path": "/tmp/{{.Flavor}}.iso",
"http_directory": "http",
"iso_checksum": "9b218654cdcdf9722171648c52f8a088",
"iso_checksum_type": "md5",
"iso_url": "http://mirror.us.leaseweb.net/ubuntu-releases/10.04.4/ubuntu-10.04.4-server-amd64.iso",
"ssh_username": "vagrant",
"ssh_password": "vagrant",
"ssh_port": 22,
"ssh_wait_timeout": "1000s",
"shutdown_command": "echo 'shutdown -h now' > shutdown.sh; echo 'vagrant'|sudo -S sh 'shutdown.sh'",
"vm_name" : "co-ubuntu10.04x64",
"vmx_data": {
"memsize": "512",
"numvcpus": "1",
"cpuid.coresPerSocket": "1"
}
}
],
"post-processors" : [
{
"type" : "vagrant",
"output" : "co-ubuntu10.04x64-vbox.box",
"only" : ["virtualbox"]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment