Open wheelerlaw opened 1 year ago
Thanks for bubbling up this thread @wheelerlaw. Looking at the provided logs I see that upon the first deletion attempt, the VM is in a locked state so VBoxManage can't unregister the machine. It appears to be related to the fact that the VM still has a network connection that Packer has been unable to close, which results in a VBOX_E_INVALID_OBJECT_STATE
error from VBoxManage
Packer uses this error code to determine if the command is retryable, which in this case the call to unregister is. So Packer will continue calling VBoxManage unregistervm
on the VM until it is successful or has exceeded the retries (10 retries).
What you are seeing is expected behavior on how the Packer is interfacing with VBoxManage.
Do you have thoughts on how to improve this error or retry output?
Overview of the Issue
when I hit
Ctrl
+C
whenpacker build ...
is running, packer hangs for a minute or two during which my terminal does not respond to any keyboard input, before finally cleaning up the VM and exiting.I'm not entirely sure if it's a Packer issue or a VBoxManage issue, but I figured I would get the log file out there so someone who knows the interface between Packer and VBoxManage better than I do could make that determination.
Reproduction Steps
config.pkr.hcl
.packer build config.pkr.hcl
packer build
hitCtrl
+C
.Ctrl
+C
,Ctrl
+\
) and nothing will happen.Plugin and Packer version
Packer v1.8.4
virtualbox-iso
v1.0.4Simplified Packer Buildfile
Operating system and Environment details
Host OS is Fedora 37 with VirtualBox 7.0.4-1.fc37.x86_64 installed through RPMFusion.
Log Fragments and crash.log files