Reputation: 1315
Using Laravel Homestead and have my first encounter with a wild zombie vm I can't destroy.
$Vagrant global-status
...Nothing
$vboxmanage list vms
..."homestead-7" {a00faea2-9b77-466d-beac-ab892dc0f0c9}
$vboxmanage unregistervm homestead-7 --delete
...VBoxManage: error: Cannot unregister the machine 'homestead-7' while it is locked
$vboxmanage startvm homestead-7
...VBoxManage: error: The machine 'homestead-7' is already locked by a session (or being locked or unlocked)
VBoxManage: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component MachineWrap, interface IMachine, callee nsISupports
VBoxManage: error: Context: "LaunchVMProcess(a->session, sessionType.raw(), env.raw(), progress.asOutParam())" at line 589 of file VBoxManageMisc.cpp
Upvotes: 2
Views: 2184
Reputation: 1315
Kill the VBoxHeadless process and run vboxmanage unregistervm homestead-7 --delete
.
Similar SO question & answer found.
Upvotes: 2