Canot remove Hard Drive

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
David Casillas
Posts: 6
Joined: 28. Sep 2012, 10:49

Canot remove Hard Drive

Post by David Casillas »

I have tried to clone a VM but get the usual problem

Code: Select all

Failed to clone the virtual machine SLx386-1.
Cannot register the hard disk '/Users/david/VirtualBox VMs/SLx386-2/SLx386-2.vdi' {06f4d05f-967a-4aa3-9994-a14c059ef3e6} because a hard disk '/Users/david/VirtualBox VMs/SLx386-2/SLx386-2.vdi' with UUID {51fb801f-a0bd-48a6-982a-86973a9768ae} already exists.
Result Code: NS_ERROR_INVALID_ARG (0x80070057)
Component: VirtualBox
Interface: IVirtualBox {fafa4e17-1ee2-4905-a10e-fe7c18bf5554}
I have tried many suggestion but could not get it work, so I just tried to remove de cloned VM. I deleted the VM folder, and checked if any references were in the conf file. I found that a reference to the hard disk is shown in the Media Manager and also lists running VBoxManage list hdds. The entry for the problematic list is included here:

Code: Select all

UUID:           51fb801f-a0bd-48a6-982a-86973a9768ae
Parent UUID:    base
State:          inaccessible
Type:           normal (base)
Location:       /Users/david/VirtualBox VMs/SLx386-2/SLx386-2.vdi
Storage format: VDI
Capacity:       15274 MBytes
The Media Maneger says the HD is not attached and marks it with an exclamation mark maybe because the vdi file does not longer exists.

I have tried to remove the HD from Media Manager but then I get this error:

Failed to close the hard disk file /Users/david/VirtualBox VMs/SLx386-2/SLx386-2.vdi.

Code: Select all

Medium '/Users/david/VirtualBox VMs/SLx386-2/SLx386-2.vdi' cannot be closed because it is still attached to 1 virtual machines.

Result Code: VBOX_E_OBJECT_IN_USE (0x80BB000C)
Component: Medium
Interface: IMedium {05f2bbb6-a3a6-4fb9-9b49-6d0dda7142ac}
As you can see Media Manager list the HD as not attached and then removing it gives an error because it is attached.

Since I cannot see any reference to this HD in conf file, and media manger fails to delete it I don't know what steps I have to take to delete this HD from Virtual Box.
David Casillas
Posts: 6
Joined: 28. Sep 2012, 10:49

Re: Canot remove Hard Drive

Post by David Casillas »

A simple restart of the host system have solve the problem. I was so blocked I could not think in the #1 solution to every failure.
Post Reply