Skip to content

Instantly share code, notes, and snippets.

@yooakim
Last active October 23, 2018 09:13
Show Gist options
  • Save yooakim/4562cae74532c0440d8805b9667ebe5e to your computer and use it in GitHub Desktop.
Save yooakim/4562cae74532c0440d8805b9667ebe5e to your computer and use it in GitHub Desktop.
Template using hyperv-vmcx builder
{
"builders": [
{
"type": "hyperv-vmcx",
"clone_from_vmcx_path": "C:\\Users\\yooak\\source\\Basefarm\\packer-templates\\output-base\\Virtual Machines\\983A3EDE-0624-4A5C-A0BE-91FA050F68A5.vmcx",
"output_directory": "./output-updates/",
"communicator": "winrm",
"winrm_username": "vagrant",
"winrm_password": "vagrant",
"winrm_timeout": "12h",
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
"shutdown_timeout": "1h",
"ram_size": 4096,
"cpu": 2,
"switch_name": "Default Switch",
"floppy_files": [
"answer_files/2016/Autounattend.xml",
"./scripts/bootstrap.ps1",
"./scripts/unattend.xml"
]
}
],
"provisioners": [
{
"type": "powershell",
"elevated_user": "vagrant",
"elevated_password": "vagrant",
"inline": [
"Get-WUInstall -MicrosoftUpdate -AcceptAll -IgnoreReboot"
]
},
{
"type": "windows-restart",
"restart_timeout": "1h"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment