Here's another corker of an error in Oracle VirtualBox. First, you think your virtual machine is broken. Second you wonder how your storage tree got messed up.
When you move Virtual machine files around, revert machine Snapshots and update attached strage, you can get something like this:
Failed to open virtual machine located in /vm_data/machines/Quetzal-VM/Quetzal-VM.vbox.
Cannot register the DVD image '/usr/share/virtualbox/VBoxGuestAdditions.iso' {20f4b244-eb29-4082-ac34-4acf6ccb4904} because a CD/DVD image '/usr/share/virtualbox/VBoxGuestAdditions.iso' with UUID {62ebaac7-ba6d-4d7d-876b-362642de4c1b} already exists.
Result Code: NS_ERROR_INVALID_ARG (0x80070057)
Component: VirtualBox
Interface: IVirtualBox {3b2f08eb-b810-4715-bee0-bb06b9880ad2}
Which all looks a bit scary. It isn't.
While upgrading VirtualBox to 4.2, it had properly updated the .iso image of Guest Additions. Firing up a virtual machine last used under 4.1, with the 4.1 Guest Additions attached under the media tree, it then rightly complains about the conflict; two .iso's, same name, different disk ID's. VirtualBox does a double-take at this sleight of hand.
The answer? Close the VM. First make sure the guest is shut down (not saved state).Open the Preferences, go to Media Manager. See if you can release and remove the old VBoxGuestAdditions.iso from there.
If that doesn't work, you need to edit a bit of XML. Again, make sure the guest is shut down (not saved state) and the VirtualBox program itself is not running. In the VM's folder is the settings file for that VM a .vbox. You need to look for the VM by name in your designated machines folder. If the guest was created with version 4.0 or later, the file will be located in your home folder under VirtualBox VMs then the name of the guest, or wherever you specified in Preferences if you changed it. Make a backup of this file somewhere safe before you start editing.
In the .vbox file, you'll be looking for the attached media section, something like:
<DVDImages>
<Image uuid="{0fe1ba24-f623-405c-a7a9-8c157c9b0520}" location="/usr/share/virtualbox/VBoxGuestAdditions.iso"/>
</DVDImages>
Then edit the file and remove the line containing the offending image and UUID, leaving the opening and closing section tags <DVDImages> and </DVDImages> tags in place. In my case, editing from this:
<DVDImages>
<Image uuid="{20f4b244-eb29-4082-ac34-4acf6ccb4904}" location="/usr/share/virtualbox/VBoxGuestAdditions.iso"/>
<Image uuid="{4cac70c8-689d-4e2c-8b2f-4e4b21c2cdcd}" location="/vm_data/machines/software/iso/quantal-desktop-i386.iso"/>
</DVDImages>
to this:
<DVDImages>
</DVDImages>
Save the file. You should then be able to start the Guest VM and attach any media the normal way. RC

Thank you, worked well for me under OpenSuse 12.2
ReplyDeleteGreat tip. This helped me out no end!
ReplyDeleteThanks again.
Steve
ThankQ
ReplyDeleteAwesome it worked ..
ReplyDeleteThank you ...
..that helped me a lot. I tried a couple of days before without luck. Thank you :-))
ReplyDeleteThank you. It worked.
ReplyDeleteThanks. It helped.
ReplyDeleteThank you a lot! :)
ReplyDeleteThank you!
ReplyDelete