Skip to content

Instantly share code, notes, and snippets.

@ryanuber
Created March 7, 2015 17:19
Show Gist options
  • Save ryanuber/c62eb16ccc54cfa7ad38 to your computer and use it in GitHub Desktop.
Save ryanuber/c62eb16ccc54cfa7ad38 to your computer and use it in GitHub Desktop.
QEMU Headless
{
"builders":
[
{
"type": "qemu",
"iso_url": "http://releases.ubuntu.com/14.04.1/ubuntu-14.04.1-server-amd64.iso",
"iso_checksum": "ca2531b8cd79ea5b778ede3a524779b9",
"iso_checksum_type": "md5",
"output_directory": "out",
"shutdown_command": "sudo shutdown -P now",
"disk_size": 100000,
"format": "qcow2",
"headless": true,
"accelerator": "kvm",
"http_directory": "http",
"ssh_username": "packer",
"ssh_password": "packer",
"ssh_port": 22,
"ssh_wait_timeout": "1h",
"vm_name": "packer",
"net_device": "virtio-net",
"disk_interface": "virtio",
"boot_wait": "5s",
"qemuargs": [
["-m", "1024M"]
],
"boot_command": [
"<esc>",
"<esc>",
"<enter>",
"<wait>",
"/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",
" noapic",
" preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg",
" -- ",
"<enter>"
]
}
]
}
choose-mirror-bin mirror/http/proxy string
d-i base-installer/kernel/override-image string linux-server
d-i clock-setup/utc boolean true
d-i clock-setup/utc-auto boolean true
d-i finish-install/reboot_in_progress note
# Partitions
d-i grub-installer/only_debian boolean true
d-i grub-installer/with_other_os boolean true
d-i partman-auto-lvm/guided_size string max
d-i partman-auto/choose_recipe select atomic
d-i partman-auto/method string lvm
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
d-i partman-lvm/device_remove_lvm boolean true
d-i partman/choose_partition select finish
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true
d-i partman/confirm_write_new_label boolean true
# Users
d-i passwd/user-fullname string packer
d-i passwd/user-uid string 500
d-i passwd/user-password password packer
d-i passwd/user-password-again password packer
d-i passwd/username string packer
# Packages
d-i pkgsel/install-language-support boolean false
d-i pkgsel/update-policy select unattended-upgrades
d-i pkgsel/upgrade select full-upgrade
d-i pkgsel/include string openssh-server
d-i time/zone string UTC
d-i user-setup/allow-password-weak boolean true
d-i user-setup/encrypt-home boolean false
tasksel tasksel/first multiselect standard, ubuntu-server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment