Skip to content

Instantly share code, notes, and snippets.

@mwrock
Created July 16, 2015 23:01
Show Gist options
  • Save mwrock/cd203b7899bd9ec13de0 to your computer and use it in GitHub Desktop.
Save mwrock/cd203b7899bd9ec13de0 to your computer and use it in GitHub Desktop.
packer-template
{
"builders": [{
"type": "virtualbox-iso",
"vboxmanage": [
[ "modifyvm", "{{.Name}}", "--natpf1", "guest_winrm,tcp,,55985,,5985" ],
[ "modifyvm", "{{.Name}}", "--memory", "2048" ],
[ "modifyvm", "{{.Name}}", "--cpus", "2" ]
],
"guest_os_type": "Windows2012_64",
"iso_url": "http://care.dlservice.microsoft.com/dl/download/6/2/A/62A76ABB-9990-4EFC-A4FE-C7D698DAEB96/9600.17050.WINBLUE_REFRESH.140317-1640_X64FRE_SERVER_EVAL_EN-US-IR3_SSS_X64FREE_EN-US_DV9.ISO",
"iso_checksum": "849734f37346385dac2c101e4aacba4626bb141c",
"iso_checksum_type": "sha1",
"communicator": "winrm",
"winrm_username": "vagrant",
"winrm_password": "vagrant",
"winrm_port": "55985",
"winrm_timeout": "5h",
"guest_additions_mode": "disable",
"shutdown_command": "C:/windows/system32/sysprep/sysprep.exe /generalize /oobe /unattend:C:/Windows/Panther/Unattend/unattend.xml /quiet /shutdown",
"shutdown_timeout": "15m",
"floppy_files": [
"answer_files/2012_r2/Autounattend.xml",
"scripts/postunattend.xml",
"scripts/boxstarter.ps1",
"scripts/package.ps1"
]
}],
"post-processors": [
{
"type": "vagrant",
"keep_input_artifact": true,
"output": "windows2012r2min-{{.Provider}}.box",
"vagrantfile_template": "vagrantfile-windows.template"
},
{
"type": "atlas",
"artifact": "mwrock/Windows2012R2Test",
"artifact_type": "vagrant.box",
"metadata": {
"provider": "virtualbox",
"version": "0.0.1"
}
}
],
"push": {
"name": "mwrock/Windows2012R2Test",
"vcs": true
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment