4
votes

I have installed one virtual machine with a disk on my C: drive. It got annoyingly full and I had to move the vhd. To another location:

C:\..\VMs\vm1
F:\..\VMs\vm2

Then I regenerated the uuid for the HD like this (ran with admin privileges):

C:\..\VirtualBox> .\VBOXMANAGE.EXE internalcommands sethduuid "F:\..\.vmdk"
UUID changed to: 6d201451-721c-433b-98a3-6fef07e61feb

However when I try to attach the moved disk I get an error (below).

enter image description here

My VagrantBox.xml does not contain uuid's specified in the error. O have tried some variations with restart of the whole

Here it is:

<?xml version="1.0"?>
<!--
** DO NOT EDIT THIS FILE.
** If you make changes to this file while any VirtualBox related application
** is running, your changes will be overwritten later, without taking effect.
** Use VBoxManage or the VirtualBox Manager GUI to make changes.
-->
<VirtualBox xmlns="http://www.innotek.de/VirtualBox-settings" version="1.12-windows">
  <Global>
    <ExtraData>
      <ExtraDataItem name="GUI/DetailsPageBoxes" value="general,preview,system,display,storage,audio,network,usb,sharedFolders,description"/>
      <ExtraDataItem name="GUI/GroupDefinitions/" value="m=b57112cb-c922-4986-87c0-c38002f9332b,m=ef9ad9a1-983c-497f-877e-33365dac118e,m=88180380-4021-47f7-8650-50e91806a1f5,m=d8110f52-c90e-4cfe-bd3d-09e17bd456fc"/>
      <ExtraDataItem name="GUI/LastItemSelected" value="m=GNS3 IOU VM"/>
      <ExtraDataItem name="GUI/LastWindowPosition" value="212,39,885,600"/>
      <ExtraDataItem name="GUI/RecentFolderCD" value="H:/"/>
      <ExtraDataItem name="GUI/RecentFolderHD" value="F:/VirtualBoxVMs/GNS3 IOU VM"/>
      <ExtraDataItem name="GUI/RecentListCD" value="H:\kali-linux-1.1.0a-amd64.iso;"/>
      <ExtraDataItem name="GUI/RecentListHD" value="F:\VirtualBoxVMs\GNS3 IOU VM\GNS3 IOU VM-disk1.vmdk;F:\VirtualBoxVMs\Kali 1.1.0a x64\Kali 1.1.0a x64.vhd;"/>
      <ExtraDataItem name="GUI/SplitterSizes" value="205,676"/>
      <ExtraDataItem name="GUI/SuppressMessages" value=",warnAboutInaccessibleMedia,confirmGoingScale,confirmGoingSeamless,remindAboutMouseIntegration"/>
      <ExtraDataItem name="GUI/UpdateCheckCount" value="11"/>
      <ExtraDataItem name="GUI/UpdateDate" value="1 d, 2015-07-17, stable, 4.3.16"/>
    </ExtraData>
    <MachineRegistry>
      <MachineEntry uuid="{b57112cb-c922-4986-87c0-c38002f9332b}" src="F:/VirtualBoxVMs/Linux Ubuntu 14.04.1 LTS x64/Linux Ubuntu 14.04.1 LTS x64.vbox"/>
      <MachineEntry uuid="{ef9ad9a1-983c-497f-877e-33365dac118e}" src="F:/VirtualBoxVMs/Windows 8.1 x64 member server/Windows 8.1 x64 member server.vbox"/>
      <MachineEntry uuid="{88180380-4021-47f7-8650-50e91806a1f5}" src="F:/VirtualBoxVMs/Kali 1.1.0a x64/Kali 1.1.0a x64.vbox"/>
      <MachineEntry uuid="{d8110f52-c90e-4cfe-bd3d-09e17bd456fc}" src="F:/VirtualBoxVMs/GNS3 IOU VM/GNS3 IOU VM.vbox"/>
    </MachineRegistry>
    <MediaRegistry>
      <HardDisks/>
      <DVDImages/>
      <FloppyImages/>
    </MediaRegistry>
    <NetserviceRegistry>
      <DHCPServers>
        <DHCPServer networkName="HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter" IPAddress="192.168.56.100" networkMask="255.255.255.0" lowerIP="192.168.56.101" upperIP="192.168.56.254" enabled="1"/>
      </DHCPServers>
    </NetserviceRegistry>
    <SystemProperties defaultMachineFolder="C:\Users\Mindaugas\VirtualBox VMs" defaultHardDiskFormat="VDI" VRDEAuthLibrary="VBoxAuth" webServiceAuthLibrary="VBoxAuth" LogHistoryCount="3" exclusiveHwVirt="false"/>
    <USBDeviceFilters/>
  </Global>
</VirtualBox>
1
Do you use snapshots? They often cause UUID troubles.(containing old UUID etc.)Toris
All my snapshot folders are empty. However I changed the snapshot location to the new disk aswell. Can this be the cause? Where do those uuid's come from if they are not in the file mentioned in the error message?Mindaugas Bernatavičius
See last 2 posts in this topic: forums.virtualbox.org/viewtopic.php?f=3&t=14976 > "The way to avoid duplicate UUIDs in VHD/VDI/VMDK is to not use the host OS to copy the disk image file."Toris
Thanks very much. I will put an answer in how to fix the issue IF someone will make the mistake of copying the file with host OS's copy->paste mechanism.Mindaugas Bernatavičius

1 Answers

13
votes

The proper way to move a virtual drive is with the "Copy" feature of File > Virtual Media Manager (as described here: https://forums.virtualbox.org/viewtopic.php?f=3&t=14976 , thanks @Toris).

IF however you did the same mistake I did and used copy->paste of the disk and then fail to attach it use these steps:

  1. Go to VirtualBox management panel GUI;
  2. Press: File (top panel) -> Virtual Media Manager (VMM);
  3. Choose the hard disks that fail to attach properly and REMOVE them;
  4. Reattach them for each VM instance the normal way;

There were no UUID errors after I REMOVED the disk through (VMM) - in case you still get errors, please post here or in another question with the reference to this one, so we know this solution has been tried out.