1

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.

4
  • Remove harddisk from media manager, add VM (without harddisk), readd harddisk
    – Eugen Rieck
    Feb 28, 2012 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, 2012 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, 2012 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, 2012 at 13:45

3 Answers 3

0

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.

1

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
0

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">
    <MediaRegistry>
      <HardDisks>
        <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 -------}"/>
          </AttachedDevice>
        </StorageController>
 -----

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

You must log in to answer this question.

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