how to keep ~/VirtualBox\ VMs/vm-name/ on packer error?

386 views
Skip to first unread message

chris snow

unread,
Feb 4, 2014, 12:58:57 AM2/4/14
to packe...@googlegroups.com
When packer encounters an error during setting up a box, it seems to rewind and delete the box in ~/VirtualBox\ VMs/vm-name/

Is there a configuration option to prevent this folder being deleted?  I would like to keep the folder so that I can view the log files.

Many thanks,

Chris

Prasanna Santhanam

unread,
Feb 4, 2014, 2:12:25 AM2/4/14
to packe...@googlegroups.com
I think you can do this using the "keep_input_artifact" arg in your
post-processor. Documented in http://www.packer.io/docs/templates/post-processors.html

Usually I use the build's debug mode to login and fix issues while
developing the recipe.

--
Prasanna.,

------------------------
Powered by BigRock.com

Kyle Passarelli

unread,
May 25, 2014, 11:55:51 PM5/25/14
to packe...@googlegroups.com, t...@apache.org
I think that the 'keep-input-artifact' only comes into play during post processing: it will keep the provisioned virtual machine around after pre-processing (say, to a Vagrant box).

The -debug flag is probably what's doing the trick.  I'll start using it.

k

Ivan Ilves

unread,
Aug 1, 2016, 11:43:30 AM8/1/16
to Packer, t...@apache.org
Hey there could be a workaround for a shell provisioner, I have no idea about other provisioners though. :-/
Reply all
Reply to author
Forward
0 new messages