While provisioning, I install a software which needs to complete a part of 
installation on rebooting the machine.

So after I run my powershell script to install the software, I issue 
windows_restart with a restart check command.

"provisioners": [
    {
      "type": "powershell",
      "elevated_user": "myuse",
      "elevated_password": "{{ user `admin_pass` }}",
      "script": "./scripts/install_software.ps1"
   },
   {
      "type": "windows-restart",
      "restart_check_command": "powershell -command \"& {Get-Process | 
Where-Object { $_ProcessName -ne 'msiexec' }}\""
      "restart_timeout": "30m"
    },
]


So, I am asking packer to assume the restart is completed only when there 
is no misexec process is running. After which I run some clean up scripts. 

my post installation step installs some drivers and it takes atleast 20 
mins to finish.

but the instance gets terminated even before running the cleanupscripts. 
Any clue?

TIA

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/43549505-00aa-46a9-b794-19275297aaeb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to