Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using VirtualBox 4.1.8 on Windows 7 64-bit. Yesterday I was happily working on a VM. Today the VirtualBox Manager said the VM was "inaccessible" and that it could not find the hard disk image. I checked the location where my VMs are stored and it was there.

So I removed the VM from the list and attempted to re-add the hard disk image. VirtualBox gave me this error:

Failed to open virtual machine located in D:/VM/Template Win7/Template Win7.vbox.

Trying to open a VM config 'D:/VM/Template Win7/Template Win7.vbox' which has the same UUID as an existing virtual machine.

Result Code: E_FAIL (0x80004005)
Component: Machine
Interface: IMachine {5eaa9319-62fc-4b0a-843c-0cb1940f8a91}
Callee: IVirtualBox {c28be65f-1a8f-43b4-81f1-eb60cb516e66}

There is no other VM with the same name anymore so I seem to be stuck.

share|improve this question

migrated from Feb 28 '12 at 22:13

This question came from our site for professional and enthusiast programmers.

Remove harddisk from media manager, add VM (without harddisk), readd harddisk – Eugen Rieck Feb 28 '12 at 10:22
I tried this but still get the same error. I do seem to have 2 vmdk files with the same name but in different folders. I've tried manually renaming the files but that doesn't work either. – rf_wilson Feb 28 '12 at 10:42
Remove both from media manager, add VM - you have to start with the VMs and do the disks then. Now add first Disk and attach to VM. Then try 2nd disk and post output – Eugen Rieck Feb 28 '12 at 10:57
Thanks Eugen that worked. After removing both VMs and both hard disk images (but without deleting any files) I was able to re-add them both back in again. – rf_wilson Feb 28 '12 at 13:45
I will give this as an answer, please accept it. – Eugen Rieck Feb 28 '12 at 15:06
up vote 0 down vote accepted

GUID problems in VirtualBox are quite common. You can more often than not resolve them by removing all conflicting objects (i.e.: 2 virtual HDs with same GUID: remove both) and then readding them in order.

Additionally you should first register your VMs, after that the HDs if you transported or copied them.

share|improve this answer

Ultimately you need to clean up the duplicate UUIDs. The best way is to remove one of the impacted VHD files from the storage manager (and associated machines) then change the UUID:

VBoxManage internalcommands sethduuid path_to_vhd

You should be able to attach the VHD in the storage manager and assign it back to the machine(s) you need.

As a best practice, when cloning a virtual hard drive file use the associated VBoxManage command as well as it will automatically generate a new UUID for the cloned drive.

VBoxManage clonedhd source_vhd_file dest_vhd_file
share|improve this answer

Such problem occurs when you are copying Virtualbox VMs directly off the browser/explorer. You have regenerate the UUID of the disk and virtual machine for them using this command.

VBoxManage internalcommands sethduuid "localtion/to/your/hddimage.vdi"

It will generate a new UUID for you VBox HDD. You can use that UUID to change the UUID of the virtual machine as well. Open virtual box configuration file, yourvmname.vbox and make the following changes.

<Machine uuid="{------ Here -----}" name="Ubuntu-12.10-Server" OSType="Ubuntu" currentSnapshot="{8071455e-656a-492f-afae-543ddbaaadfc}" snapshotFolder="Snapshots" lastStateChange="2013-01-02T09:47:31Z">
        <HardDisk uuid="{-------- Here -----}" 
        <StorageController name="SATA" type="AHCI" PortCount="1" useHostIOCache="false" Bootable="true" IDE0MasterEmulationPort="0" IDE0SlaveEmulationPort="1" IDE1MasterEmulationPort="2" IDE1SlaveEmulationPort="3">
          <AttachedDevice type="HardDisk" port="0" device="0">
            <Image uuid="{------ And Here -------}"/>

Save the file and open the machine. It will work as normal.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .