I tried on the VirtualBox forum https://forums.virtualbox.org/viewtopic.php?f=7&t=78830 But they claim the issue is on Packer side :-)
As for me running headless solved my issue. I though about it reading the last line in VirtualBox logs: 00:05:21.112882 Changing the VM state from 'DESTROYING' to 'TERMINATED' 00:05:21.115679 Console: Machine *state changed to 'PoweredOff'* 00:05:21.115896 GUI: Request to close Runtime UI because VM is powered off already. 00:05:21.115907 GUI: Passing *request to close Runtime UI* from machine-logic to *UI session*. Looks like VirtualBox closes the session after changing the state to "TERMINATED", that may confuse Packer -- 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/562d9d32-e2a4-4c92-9e20-15f9cf3d9483%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
