Stderr: VBoxManage.exe: error: Cannot unregister the machine 'chefmeds_1388059363' while it is locked

3,157 views
Skip to first unread message

John Riker

unread,
Dec 27, 2013, 4:03:22 PM12/27/13
to vagra...@googlegroups.com
I am trying to delete a vagrant host on an Oracle VM and running into following error

C:\chefmeds>vagrant destroy
Are you sure you want to destroy the 'default' VM? [y/N] y
[default] Destroying VM and associated drives...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["unregistervm", "c7c7aa43-5675-4a6b-91f9-6c98e47c3e8f", "--delete"]

Stderr: VBoxManage.exe: error: Cannot unregister the machine 'chefmeds_1388059363' while it is locked
VBoxManage.exe: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component Machine, interface IMachine, callee IUnknown
VBoxManage.exe: error: Context: "Unregister(fDelete ? (CleanupMode_T)CleanupMode_DetachAllReturnHardDisksOnly : (CleanupMode_T)CleanupMode_DetachAllReturnNone, ComSafeArrayAsOutParam(aMedia))" at line  160 of file VBoxManageMisc.cpp

Has anyone seen this issue. Is there any other way to get the vagrant host removed?

Thanks

John Riker

unread,
Dec 27, 2013, 4:43:05 PM12/27/13
to vagra...@googlegroups.com
I was able to workaround the issue, by 
1) rebooting the windows host on which Oracle VM was running (to remove any pending locks)
2) Remove the host from c:\users\<user_name>\VirtualBox VMs\<hostname directory> - Reomved the hostname directory
3) Removing the record for the host from VirtualBox.xml under c:\users\<user_name>\.VirtualBox\ uner the tage MachineRegistry
Reply all
Reply to author
Forward
0 new messages