Thanks, I did try -on-error=ask, there are 3 options: clean(default), abort (left vm), ask(retry)
sometimes I know the error is not critical and cannot avoid it for some reason, seems no way to ignore the error to continue build box? BR/ Robert On Saturday, January 6, 2018 at 2:32:09 AM UTC-5, Rickard von Essen wrote: > > Packer always stops when script exits with a non zero exit code. Try > adding "set -x" at the top of your script (after the shebang) and se why it > fails. > > You can also run packer build with -on-error=ask to get time to ssh into > the VM and research the state it is in when it fails. > > On 6 January 2018 at 05:34, Robert Wang <robert....@gmail.com > <javascript:>> wrote: > >> I used packer to build ubuntu 17 box, it stop and destroy vm for any >> error message, >> >> virtualbox-iso: VirtualBox Guest Additions: modprobe vboxsf failed >> ==> virtualbox-iso: Deregistering and deleting VM... >> ==> virtualbox-iso: Deleting output directory... >> Build 'virtualbox-iso' errored: Script exited with non-zero exit status: 2 >> >> It never stop when build centos 7 for same error. >> >> Is any way to prevent to stop and destroy vm when get error? >> >> env: >> >> win7 + msys64 >> >> $ packer version >> Packer v1.1.3 >> >> >> >> Thanks. >> >> BR/ >> Robert >> >> -- >> 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 <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/packer-tool/f08246a0-8a43-4e53-ab89-ce357fcecea7%40googlegroups.com >> >> <https://groups.google.com/d/msgid/packer-tool/f08246a0-8a43-4e53-ab89-ce357fcecea7%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > > -- 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/fa720c65-c7a7-4d71-b774-032f40f10ba8%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.