You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
70 lines
2.0 KiB
70 lines
2.0 KiB
{
|
|
"variables": {
|
|
"output_directory": "packer-output"
|
|
},
|
|
"builders": [
|
|
{
|
|
"type": "virtualbox-iso",
|
|
"iso_url": "http://care.dlservice.microsoft.com/dl/download/B/9/9/B999286E-0A47-406D-8B3D-5B5AD7373A4A/9600.17050.WINBLUE_REFRESH.140317-1640_X86FRE_ENTERPRISE_EVAL_EN-US-IR3_CENA_X86FREE_EN-US_DV9.ISO",
|
|
"iso_checksum_type": "sha1",
|
|
"iso_checksum": "4ddd0881779e89d197cb12c684adf47fd5d9e540",
|
|
"headless": true,
|
|
"boot_wait": "2m",
|
|
"communicator": "winrm",
|
|
"winrm_username": "vagrant",
|
|
"winrm_password": "vagrant",
|
|
"winrm_timeout": "2h",
|
|
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
|
|
"guest_os_type": "Windows81",
|
|
"disk_size": 61440,
|
|
"guest_additions_mode": "attach",
|
|
"floppy_files": [
|
|
"./Autounattend.xml",
|
|
"../scripts/microsoft-updates.bat",
|
|
"../scripts/win-updates.ps1"
|
|
],
|
|
"vboxmanage": [
|
|
[ "modifyvm", "{{.Name}}", "--memory", "2048" ],
|
|
[ "modifyvm", "{{.Name}}", "--cpus", "2" ]
|
|
]
|
|
}
|
|
],
|
|
"provisioners": [
|
|
{
|
|
"type": "windows-shell",
|
|
"inline": [
|
|
"cmd /c md C:\\PackerTemp\\PostInstall"
|
|
]
|
|
},
|
|
{
|
|
"type": "file",
|
|
"source": "../scripts/postinstall/wintriallab-postinstall.psm1",
|
|
"destination": "C:\\PackerTemp\\PostInstall\\wintriallab-postinstall.psm1",
|
|
"direction": "upload"
|
|
},
|
|
{
|
|
"type": "file",
|
|
"source": "../scripts/postinstall/postinstall.ps1",
|
|
"destination": "C:\\PackerTemp\\PostInstall\\postinstall.ps1",
|
|
"direction": "upload"
|
|
},
|
|
{
|
|
"type": "powershell",
|
|
"inline": ["C:\\PackerTemp\\PostInstall\\postinstall.ps1 -Verbose"]
|
|
},
|
|
|
|
{
|
|
"type": "windows-shell",
|
|
"inline": ["rmdir /S /Q C:\\PackerTemp"]
|
|
}
|
|
],
|
|
"post-processors": [
|
|
{
|
|
"type": "vagrant",
|
|
"keep_input_artifact": false,
|
|
"output": "{{user `output_directory`}}/windows_81_x86_{{.Provider}}.box",
|
|
"vagrantfile_template": "vagrantfile-windows_81_x86.template"
|
|
}
|
|
]
|
|
}
|