Skip to content

Instantly share code, notes, and snippets.

@timsutton
Last active December 19, 2015 21:59
Show Gist options
  • Save timsutton/6024114 to your computer and use it in GitHub Desktop.
Save timsutton/6024114 to your computer and use it in GitHub Desktop.
Sample Packer template for OS X. ISO was built using prepare_veewee_iso.sh script available in the Veewee OS X template: https://github.com/jedi4ever/veewee/tree/master/templates/OSX/prepare_veewee_iso
{
"builders": [
{
"boot_wait": "2s",
"disk_size": 20480,
"guest_os_type": "darwin12-64",
"http_directory": "http",
"iso_checksum_type": "md5",
"iso_checksum": "50d9327a222ea08fda43475cb901f937",
"iso_url": "file:///Users/tsutton/git/github/veewee/iso/OSX_InstallESD_10.8.3_12D78.dmg",
"shutdown_command": "echo 'vagrant'|sudo -S shutdown -h now",
"skip_compaction": true,
"ssh_password": "vagrant",
"ssh_port": 22,
"ssh_username": "vagrant",
"ssh_wait_timeout": "10000s",
"tools_upload_flavor": "darwin",
"type": "vmware",
"vmx_data": {
"cpuid.coresPerSocket": "1",
"memsize": "2048",
"numvcpus": "1",
"firmware": "efi",
"keyboardAndMouseProfile": "macProfile",
"smc.present": "TRUE",
"hpet0.present": "TRUE",
"ich7m.present": "TRUE",
"ehci.present": "TRUE",
"usb.present": "TRUE"
}
}
],
"post-processors": [
"vagrant"
],
"provisioners": [
{
"execute_command": "chmod +x {{ .Path }}; sudo {{ .Vars }} {{ .Path }}",
"scripts": [
"scripts/postinstall.sh",
"scripts/xcode-cli-tools.sh",
"scripts/chef-omnibus.sh",
"scripts/puppet.sh",
"scripts/fix_user_perms.sh"
],
"type": "shell"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment