Page 1 of 1

VM Inaccessible

Posted: 4. Jul 2013, 16:30
by IFChicago
I am running VB 4.2.14 r86644 Windows 7 guest on Max OSX 10.7.5 host

VB reports that my VM is inaccessible with the following error message:

Cannot attach medium '/Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso' {b686ed09-ccd1-45ae-9d8d-ab9ff460aa75}: medium is already associated with the current state of machine uuid {a83543e2-6b84-490a-b081-91f10dbae1c2}!.
Result Code:
VBOX_E_OBJECT_IN_USE (0x80BB000C)
Component:
Medium
Interface:
IMedium {29989373-b111-4654-8493-2e1176cba890}

I assume the VM closed without being shut down properly. The Virtual media Manager shows no hard drive, although it does show VBoxGuestAdditions.iso.

I am able to locate the VDI file, which is dated July 3.

How do I recover?

Re: VM Inaccessible

Posted: 4. Jul 2013, 16:46
by mpack
IFChicago wrote: I assume the VM closed without being shut down properly.
The error message does not carry that implication. Just like on a real PC, a CD remains in the drive until you specifically eject it. Suspending / powering down / restarting the PC does not eject the CD.

That said, VirtualBox shouldn't mind the same (read only) ISO file being mounted by multiple VMs. It has however been known to get confused if the ISO image changes while still mounted but keeps the same name and location. One way to get this error is to update the VirtualBox software while a VM is suspended with the old GAs ISO still mounted in its drive.

The cure is normally quite easy: go to File | Virtual Media Manager and force the old VBoxGuestAdditions.iso file to be Released and then Removed (but when asked: don't delete the physical file). You may need to discard the saved state of any VM which was suspended when VBox was updated, as that saved state is now orphaned.

Re: VM Inaccessible

Posted: 6. Jul 2013, 16:22
by IFChicago
I went to File>Virtual Media Manager>Optical Disks and removed the VBoxGuestAdditions.iso. After restarting VirtualBox I get the same error message and the VBoxGuestAdditions.iso is restored.

Re: VM Inaccessible

Posted: 7. Jul 2013, 11:30
by mpack
I've never seen VirtualBox restore a medium which you removed. Normally it couldn't because it wouldn't know the path. I guess it's possible that VBoxGuestAdditions.iso is somehow being treated as a special case.

In that case the next thing I would try is discarding the saved states of all VMs.

If that doesn't work then please find out what VM correponds with the {a83543e2-6b84-490a-b081-91f10dbae1c2} VM-UUID (look in VirtualBox.xml), find the .vbox file for that VM, zip it and post it here as an attachment.

Re: VM Inaccessible

Posted: 7. Jul 2013, 17:30
by IFChicago
n that case the next thing I would try is discarding the saved states of all VMs.
How do I do that?

Re: VM Inaccessible

Posted: 7. Jul 2013, 17:56
by loukingjr
IFChicago wrote:
n that case the next thing I would try is discarding the saved states of all VMs.
How do I do that?
To delete the saved state just locate the Snapshots folder with the .sav file in your VirtualBox VM folder for the guest you are having trouble with. The other thing you could do is set up a new Windows 7 guest with a different name and just attach the .vdi you found instead of creating a new .vdi.

Re: VM Inaccessible

Posted: 7. Jul 2013, 19:01
by mpack
To delete a saved state, right click the VM in the GUI and select "Delete saved state".

Re: VM Inaccessible

Posted: 7. Jul 2013, 19:51
by loukingjr
mpack wrote:To delete a saved state, right click the VM in the GUI and select "Delete saved state".
sure, if you want to do it the easy way :)

Re: VM Inaccessible

Posted: 8. Jul 2013, 16:08
by IFChicago
To delete a saved state, right click the VM in the GUI and select "Delete saved state".
When I right-click on the VM in the GUI, the "discard saved state" option is greyed out.

Re: VM Inaccessible

Posted: 8. Jul 2013, 16:17
by loukingjr
that means there is no saved state.

Re: VM Inaccessible

Posted: 8. Jul 2013, 17:34
by mpack
Do you have more than one VM? If yes then make sure none of them have a saved state.

If you have no saved states in any VM then I'm afraid it implies that an old snapshot state still has this ISO mounted. In that case you would have to delete the old snapshots, losing the ability to revert to those old states. I suggest making a backup of your VM folders before you try this, as snapshots are notoriously error prone.