Looking for quick way to reuse a vdi I preped with Windows XP SP3 and recent updates, I decided to duplicate the vdi with Windows Explorer. Of course, this was too simple. After attempting to create a new virtual machine which used the newly created vdi, I was presented with a nasty error along the lines of ”Failed to open the hard disk ….” and “Cannot register the hard disk C:\path\to\new\vdi with UUID {xxxx} because a hard disk C:\path\to\old\vdi already exists in the media registry (C:\path to VirtualBox.xml)
Luckily there is a simple fix for this…
Lauch a command prompt and browse to where VBoxManager.exe is located (for me this is C:\Program Files\Oracle\VirtualBox) and run the comand below
VBoxManage.exe internalcommands setvdiuuid "C:\path\to\new\vdi"
NOTE: the command has been changed to sethduuid in version 4.0.4 (thanks Isaac!). So the commad in 4.0.4 would be…
VBoxManage.exe internalcommands sethduuid "C:\path\to\new\vdi"
Which should return something similar to “UUID Changed to …”
Isaac W. March 17, 2011 at 8:57 pm
With version 4.0.4, use “sethduuid” instead of “setvdiuuid.”
Shaik June 8, 2011 at 6:30 am
Its Working fine.
Thanks a Lotttttttt
M.Back June 17, 2011 at 10:43 am
thanks a lot fot that good description!
Mostafa July 1, 2011 at 1:37 am
Extreme big hug thank u !!!
the manual really sucks and u give it like a glance :d
Amyo Rahman July 6, 2011 at 3:42 pm
Thanks!!
MS July 22, 2011 at 2:15 pm
Thanks for sharing, this helped for sure!
Dave K August 29, 2011 at 4:45 am
Genius! What a life saver! Many Thanks
Neeraj Pansari September 29, 2011 at 7:17 am
Thanks for the detailed info.
It is easy and it works fine
Asadi October 24, 2011 at 1:03 am
Thanks, I used “sethduuid” instead of “setvdiuuid.”
Sergey November 28, 2011 at 10:22 am
Thanks a lot! It’s helped me on 4.1.6 version, I uses “sethduuid”
Ricky November 30, 2011 at 3:34 am
It solved my problem, thank you very much.
Jim December 2, 2011 at 12:40 pm
Worked on a VMDK (VMWare) disk as well (that I’m using under VirtualBox). I pulled many hairs over the last few days until I found your post – thank you.
liming December 5, 2011 at 8:16 am
thank you ! 终于知道解决方法了……(NOTE: the command has been changed to sethduuid in version 4.0.4 (thanks Isaac!). So the commad in 4.0.4 would be…)
Richard Hundhausen March 6, 2012 at 2:31 pm
Thanks Randall. You saved me some time today!
sammi April 24, 2012 at 7:30 am
Thanks alot
LazerFX April 30, 2012 at 11:30 am
Thanks, you just saved me a load of time
This blog-post is going in my bookmarks for sure. Like others, I used the new (sethduuid) command format, with VirtualBox 4.1.12
Adam May 4, 2012 at 1:38 pm
When I try to run sethduuid on 4.1.14 using this command:
vboxmanage internalcommands setheuuid “E:\vm.vdi”
I get the following error:
VERR_FILE_NOT_FOUND at D:\tinderbox\win-4.1\src\VBox\Storage\VD.cpp(4484) in function VDOpen
VBoxManage.exe : error: Cannot open the image : VERR_FILE_NOT_FOUND
I have no D: drive and have nothing to do with tinderbox. Help!
R. Kent May 7, 2012 at 2:03 pm
Adam -
Can you confirm your .virtualbox file is pointing to the correct location of the vdi?
Adam May 7, 2012 at 2:33 pm
Yes, and no reference anywhere to a D: drive.
Adam May 7, 2012 at 3:43 pm
SOLVED – turns out vboxmanage is case sensitive when looking at path and file names.
Simple solution!
hamid May 10, 2012 at 8:50 am
thanks a lot !
Good answer
Arnold June 5, 2012 at 5:33 am
Its works great ! Thx
Thodoris June 25, 2012 at 2:22 pm
thank you…. It was just driving me crazy
Jason September 1, 2012 at 1:10 am
Thanks a lot!
That’s so easy
Alex November 2, 2012 at 6:01 pm
Thanks a lot! Resetting the uuid via cmd totally fixed my problem. You’re the man!!
Jun November 24, 2012 at 1:39 pm
Thanks a lot ! My problem was solved!
Taher December 13, 2012 at 11:39 am
Thx a mil
Rahul December 27, 2012 at 1:37 am
Thanks a lot!
It was really useful for me to save my time….
Tamil Astrology January 16, 2013 at 9:41 am
Thank you very much. I knew there was a solution and it was in the back of my mind. Your link was the first entry when I searched for the solution.
I had copied a cloned image into a different location (instead of the default C: drive), which, when I tried to use, caused this error.
Vito April 3, 2013 at 9:45 am
I have use the command and I do not have any error but when i try to import the Virtual Machine Definiton file I obtain the same error. There is another way to solve the problem? Thanks.
R. Kent June 18, 2013 at 4:26 pm
Vito –
Check out @thegeekprophet’s reply with the reminder to update the UUID in the .vbox file. Let us know if that works!
thegeekprophet April 10, 2013 at 10:32 am
If it still complains, dont forget to update the UUID in the .vbox file for the drives you updated…