FIX: VirtualBox Failed to open Hard Disk file. Cannot register virtual hard disk because a disk with the same UUID already exists.(Solved)
This tutorial contains instructions to fix the following error when trying to add an existing virtual hard drive in VirtualBox: "Failed to open the hard disk file <VirtualHardDiskFilename.vdi>, because a hard disk with the same UUID already exists".Â
The "Failed to open the disk Image File – Cannot Register Hard Disk" error in VirtualBox appears because the VM Disk Image File that you try to open has the same UUID with another Virtual Disk Image file. At that case, Virtualbox cannot register the disk image file (VDI, VHD, VMDK, etc.) and displays the following error:
"Cannot register the hard disk 'C:\Users\%Username%\VirtualBox VMs\%VirtualDiskName1%.vdi' {%Virtual-Disk-UUID%} because a hard disk 'C:\Users\%Username%\VirtualBox VMs\VirtualDiskName2%.vdi' with UUID {%Virtual-Disk-UUID%} already exists.
Result Code:
E_INVALIDARG (0x80070057)
Component:
VirtualBox
Interface:
IVirtualBox {fafa4e17-1ee2-4905-a10e-fe7c18bf5554}
Callee RC:
VBOX_E_OBJECT_NOT_FOUND (0x80BB0001)"
How to resolve VirtualBox error: Failed to open virtual hard disk file (.VDI) because hard disk already exits.
Method 1. Remove the Missed Virtual Disk file from VirtualBox.
Method 2. Clone Disk Image with Virtual Media Manager.
Method 3. Change the Virtual Disk's UUID.
Method 1. Remove Missed Virtual Disks from VirtualBox.
The above error can appear if you have moved the virtual hard disk to another location (e.g. volume) and then you try to re-add the virtual hard disk (from the new location) to a new or to an existing virtual machine, without having previously removed the missed disk from VirtualBox. At this case, you have to release the missing virtual disk file using the VirtualBox Media Manager. To do that:
1. From VirtualBox File menu, open the Virtual Media Manager.
2. Highlight the missed Virtual Disk (the one with the error sign)* and click Release. (When asked, press the Release button to release the missing hard drive.)
* Note: If you don't see any missed disks here, continue to method-2.
3. Then, click Remove (and then press the Remove button) to remove the missing virtual hard disk.
4. Close Virtual Media manager.
5. Highlight the VM where you want to add the Virtual Hard Drive file (.VDI) and click Settings.
6. Select Storage at the left pane and then click the 'Add hard disk' icon at the right.
7. Click Choose existing disk.
8. Select the virtual hard disk file that you want to add and click Open.
9. Click OK to close Virtual Machine settings.
10. Start the Virtual Machine.
Method 2. Clone Virtual Disk with Virtual Media Manager.
To avoid the "Failed to open the disk Image File, Cannot Register the Hard Disk" error from happening, is to clone Virtual Disk image files (VDI, VHD, etc.), by using the VirtualBox Media Manager,* instead of using the host's OS Copy/Paste functions. To do that:
* Note: The proper way to successfully clone an existing virtual hard disk image file (VDI, VHD, VMDK, etc.), is to use the Copy function in VirtualBox Media Manager.
1. From Virtualbox's File menu select Virtual Media Manager.
2. Select the Virtual Hard disk, that you want to clone and click Copy.
3. At the next screen, make your choices about the "Disk Image File Type" & "Size" (or leave the default settings) and finally give a name for the new disk image.
4. When done, click Copy and wait until the new disk image creation completed.
5. When the copy done, use the copied disk image to create a new virtual machine in Virtualbox.
Method 3. Change the Virtual Disk's UUID.
The final method to resolve the "Cannot Register Virtual Hard Disk" problem, is to reset the UUID of the Virtual Disk file (VDI) mentioned in the VirtualBox's error. To do that:
1. Close VirtualBox application.
2. Open Command Prompt as Administrator. To do that:
a. In the Search box type: cmd (or command prompt).
b. Right click on the command prompt (result) and select Run as Administrator.
3. Copy & Paste in command prompt the following command in command prompt window and press Enter:
- cd C:\Program Files\Oracle\VirtualBox
4. Now type the following command and press Enter: *
- vboxmanage internalcommands sethduuid "%Full_Path_To_VHD_File%"
* Note: At the above command change the %Full_Path_To_VHD_File% value according your case. For example: If you want to reset the UUID of the virtual disk image file "Windows7.vdi" which located at "C:\Users\Admin\VirtualBox VMs\Windows7VM" folder, the command should be:
- vboxmanage internalcommands sethduuid "C:\Users\Admin\VirtualBox VMs\Windows7VM\Windows7.vdi"
5. If everything goes fine, then you should informed that the UUID has changed.
6. Close command prompt and now try to attach the virtual hard disk to a new Virtual machine.
That’s all folks! Did it work for you?
Please leave a comment in the comment section below or even better: like and share this blog post in the social networks to help spread the word about this solution.
We're hiring
We're looking for part-time or full-time technical writers to join our team! It's about a remote position that qualified tech writers from anywhere in the world can apply. Click here for more details.
- How to Disable or Remove BitLocker from Windows RE. - April 24, 2024
- FIX: Error 0x8007025d in Windows 10 Update. - April 22, 2024
- How to Disable Device Encryption in Windows 11/10. - April 17, 2024
mehul valand
August 17, 2020 @ 10:23 am
Thanks a lot .
it's worked for me and also for any one.
Please Follow instructions shown by this site.
SRAVAN KUMAR
June 19, 2020 @ 2:39 pm
VEER ACCESS DENIED IT IS SHOWING IN CMD WHAT TO DO .
THANKS
lakonst
June 19, 2020 @ 2:45 pm
Make sure that you have Admin rights and Open Command Prompt as Administrator to run the command.
Triple-H
November 21, 2019 @ 11:59 pm
Thanks – excellent info.
Nik Hill
May 21, 2019 @ 11:24 am
Thanks! It worked.