Skip to content

Instantly share code, notes, and snippets.

@lordcirth
Created November 16, 2018 19:56
Show Gist options
  • Save lordcirth/7a815277d4da94869fb533e8bf893525 to your computer and use it in GitHub Desktop.
Save lordcirth/7a815277d4da94869fb533e8bf893525 to your computer and use it in GitHub Desktop.
Packer Ubuntu
{
"builders": [
{
"type": "virtualbox-iso",
"name": "acm-packer-1",
"guest_os_type": "Ubuntu_64",
"iso_url": "./ubuntu-18.04.1-server-amd64.iso",
"iso_checksum": "a5b0ea5918f850124f3d72ef4b85bda82f0fcd02ec721be19c1a6952791c8ee8",
"iso_checksum_type": "sha256",
"ssh_username": "packer",
"ssh_password": "packer",
"ssh_wait_timeout": "10000s",
"boot_wait": "5s",
"boot_command":
[
"<esc><esc><enter><wait>",
"/install/vmlinuz noapic ",
"debian-installer=en_US auto locale=en_US.UTF-8 kbd-chooser/method=us ",
"preseed/file=/floppy/preseed-desktop.cfg ",
"hostname=acm-packer ",
"fb=false debconf/frontend=noninteractive ",
"keyboard-configuration/modelcode=SKIP keyboard-configuration/layout=USA ",
"keyboard-configuration/variant=USA console-setup/ask_detect=false ",
"passwd/user-fullname=packer ",
"passwd/username=packer ",
"passwd/user-password=packer ",
"passwd/user-password-again=packer ",
"initrd=/install/initrd.gz -- <enter>"
],
"floppy_files": [
"preseed-desktop.cfg"
],
"shutdown_command": "echo 'packer' | sudo -S shutdown -P now",
"vboxmanage": [
[
"modifyvm", "{{.Name}}", "--nictype1", "virtio"
],
[
"modifyvm", "{{.Name}}", "--memory", "4096"
],
[
"modifyvm", "{{.Name}}", "--vram", "128"
],
[
"modifyvm", "{{.Name}}", "--cpus", "2"
]
]
}
],
"provisioners": [
{
"type": "shell",
"inline": ["echo 'packer' | sudo -S -- sh -c 'apt-get update && apt-get dist-upgrade -y'"]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment