Skip to content

Instantly share code, notes, and snippets.

@jhelwig
Created March 14, 2014 18:12
Show Gist options
  • Save jhelwig/9553497 to your computer and use it in GitHub Desktop.
Save jhelwig/9553497 to your computer and use it in GitHub Desktop.
{
"variables": {
"http_temp_dir": null,
"vm_platform": "centos",
"vm_version": "{{timestamp}}",
"cpu_count": "1",
"memory_mb": "1024",
"disk_mb": "40000",
"iso_url_base": "http://baker/kickstart_isos/isos/centos/",
"iso_name": "centos-20140307T012531-production.iso",
"iso_sha1": "b485f585d40c1dc76852a94fca1568243d400091",
"vendor": "Elemental Technologies, Inc.",
"vendor_url": "http://elementaltechnologies.com"
},
"builders": [
{
"headless": "true",
"type": "virtualbox-iso",
"format": "ova",
"vm_name": "{{user `vm_platform`}}-{{user `vm_version`}}",
"guest_os_type": "RedHat_64",
"iso_url": "{{user `iso_url_base`}}{{user `iso_name`}}",
"iso_checksum": "{{user `iso_sha1`}}",
"iso_checksum_type": "sha1",
"ssh_username": "root",
"ssh_password": "password",
"ssh_wait_timeout": "30m",
"shutdown_command": "echo 'packer' | sudo -S shutdown -P now",
"http_directory": "{{user `http_temp_dir`}}",
"boot_command": [ "<esc><wait>linux xdriver=vesa nomodeset ks=http://{{ .HTTPIP }}:{{ .HTTPPort}}/ks.cfg hostname={{ .Name }} disklayout=sda<enter>" ],
"boot_wait": "5s",
"disk_size": "{{user `disk_mb`}}",
"guest_additions_mode": "disable",
"hard_drive_interface": "sata",
"vboxmanage": [
["modifyvm", "{{.Name}}", "--memory", "{{user `memory_mb`}}"],
["modifyvm", "{{.Name}}", "--cpus", "{{user `cpu_count`}}"]
],
"vboxmanage_post": [
["modifyvm", "{{.Name}}", "--nic1", "bridged"],
["modifyvm", "{{.Name}}", "--nic2", "bridged"],
["modifyvm", "{{.Name}}", "--nic3", "bridged"]
],
"virtualbox_version_file": "/root/.vbox_version",
"export_opts": ["--manifest", "--options", "nomacs", "--vsys", "0", "--vendor", "{{user `vendor`}}", "--vendorurl", "{{user `vendor_url`}}", "--version", "{{user `vm_version`}}"]
}
],
"provisioners": [
{
"type": "shell",
"inline": ["date > ~elemental/packer_was_here.txt"]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment