Hi, I have a strange issue trying to automatically install visual studio inside a vm with packer:
{ "type" : "powershell", "elevated_user": "{{user `ssh_name`}}", "elevated_password": "{{user `ssh_pass`}}", "inline": [ "NET USE S: /DELETE /YES >NUL 2>NUL", "NET USE S: \\\\host\\shared /persistent:no /YES", "while (!(Test-Path \"S:\\\")) {", " NET USE S: /DELETE /YES >NUL 2>NUL", " NET USE S: \\\\host\\shared /persistent:no /YES", "}", "S:", "Write-Host \"Calling Unattended VS2015 Setup - This takes a while ...\"", "cmd /C start /WAIT s:\\iso\\windows\\vs2015\\vs_professional.exe /Quiet /NoRestart /NoRefresh /NoWeb /AdminFile s:\\vm-provisioning\\configs\\jenkins\\windows-7-64\\visual-studio-2015-professional.xml /Log $env:temp\\vs2015-setup.log", "Write-Host \"Exited with $lastexitcode\"", "exit 0" ] }, I run with "PACKER_LOG=1": virtualbox-iso: Calling Unattended VS2015 Setup - This takes a while ... virtualbox-iso: Exited with 0 2016/12/01 13:57:05 ui: virtualbox-iso: Exited with 0 2016/12/01 13:57:10 packer: 2016/12/01 13:57:10 [INFO] command 'powershell -executionpolicy bypass -file "%TEMP%\packer-elevated-shell-58401290-b1c8-b157-0cd6-b29913e0a38e.ps1"' exited with code: 2 2016/12/01 13:57:10 packer: 2016/12/01 13:57:10 [INFO] RPC endpoint: Communicator ended with: 2 so: why the heck it exits with code "2" ??? I even explicitly set "exit 0" there? Thank you very much. Florian P.S: Is there a way to use packer in a kind of "snapshot" mode, so I dont have to wait 30min each time before the that provisioning step runs? -- This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list. GitHub Issues: https://github.com/mitchellh/packer/issues IRC: #packer-tool on Freenode --- You received this message because you are subscribed to the Google Groups "Packer" group. To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/24a39902-19d0-4c45-bca2-ae33ee441973%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.