Prevent packer from shutting down vm

16 views
Skip to first unread message

Shubham Bansal

unread,
Jun 26, 2019, 1:21:28 AM6/26/19
to Packer
While my script is running packer finds it to be complete because the cmd closes. Which then cause the machine shutdown command to be executed. Is there any way to either delay the shutdown or prevent it completely?

Udbhav

unread,
Jun 26, 2019, 12:19:41 PM6/26/19
to packe...@googlegroups.com
There is an option to specify the shutdown command and shutdown timeout

Here is what I think can work - 
1. Create a ".bat" file, specify to run it in shutdown command and keep the file empty. I haven't tried it by keeping it empty but I guess it should work.
2. Increase shutdown timeout to something that works for you.


On Tue, Jun 25, 2019 at 10:21 PM Shubham Bansal <sbans...@gmail.com> wrote:
While my script is running packer finds it to be complete because the cmd closes. Which then cause the machine shutdown command to be executed. Is there any way to either delay the shutdown or prevent it completely?

--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/174dd08e-9699-4144-8f94-81edb3ae33f5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Shubham Bansal

unread,
Jun 26, 2019, 12:21:13 PM6/26/19
to Packer
Shutdown timeout is for waiting until the shutdown is complete. That won't help.

Udbhav

unread,
Jun 26, 2019, 12:34:31 PM6/26/19
to Packer
Combining both above steps should work because
1st  will ensure machine won't shutdown and will indicate shutdown command is successful 
and 2nd will prevent the packer to stop machine forcefully as timeout will be large.
Reply all
Reply to author
Forward
0 new messages