Created
March 15, 2015 22:39
-
-
Save dylanmei/3316360a4e550c8e2ab7 to your computer and use it in GitHub Desktop.
packer / winrm / powershell elevated command
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"builders": [{ | |
"type": "virtualbox-windows-ovf", | |
"source_path": "ovf/windows_2008_r2.bare.ova", | |
"headless": false, | |
"boot_wait": "1m", | |
"winrm_username": "packer", | |
"winrm_password": "packer", | |
"winrm_wait_timeout": "10m", | |
"guest_additions_mode": "disable", | |
"shutdown_timeout": "2h", | |
"shutdown_command": "shutdown /s /t 7200 /f /d p:4:1 /c \"Packer Shutdown\"", | |
"vboxmanage": [ | |
["modifyvm", "{{.Name}}", "--memory", "2048"], | |
["modifyvm", "{{.Name}}", "--cpus", "1"] | |
] | |
}], | |
"provisioners": [{ | |
"type": "powershell", | |
"scripts": ["scripts/chocolatey.ps1"] | |
}, { | |
"type": "powershell", | |
"elevated_user": "packer", | |
"elevated_password": "packer", | |
"inline": [ | |
"choco install netfx-4.5.2-devpack" | |
]} | |
], | |
"post-processors": [{ | |
"type": "vagrant", | |
"keep_input_artifact": false, | |
"output": "windows_2008_r2_{{.Provider}}.box", | |
"vagrantfile_template": "windows_2008_r2/Vagrantfile.template" | |
}] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment