Packer won't build a Virtualbox VM on an ISO image. Error is
==> virtualbox-iso: Error starting VM: retry count exhausted. Last err: VBoxManage error: VBoxManage: error: The machine 'packer-virtualbox-iso-1663686568' is already locked by a session (or being locked or unlocked)
==> virtualbox-iso: VBoxManage: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component MachineWrap, interface IMachine, callee nsISupports
==> virtualbox-iso: VBoxManage: error: Context: "LaunchVMProcess(a->session, sessionType.raw(), ComSafeArrayAsInParam(aBstrEnv), progress.asOutParam())" at line 727 of file VBoxManageMisc.cpp
This issue was originally opened by @Neudrino in hashicorp/packer#12008 and has been migrated to this repository. The original issue description is below.
Community Note
Overview of the Issue
Packer won't build a Virtualbox VM on an ISO image. Error is
Reproduction Steps
https://github.com/Neudrino/magma/blob/e5066cb59483d080dd72fc1da337c4cd9acee21d/.github/workflows/build-vm-dev.yml#L14-L48
Packer version
Packer v1.8.3Simplified Packer Template
Operating system and Environment details
macos-12Log Fragments and crash.log files