Same UUID as an existing virtual machine

Discussions related to using VirtualBox on Windows hosts.
Post Reply
urketadic
Posts: 8
Joined: 12. Jul 2016, 23:26

Same UUID as an existing virtual machine

Post by urketadic »

What i did was swap VirtualBox VMs from C hard disk to D hard disk because there was no more space on it. I did it manually just cut the folder and pasted it into the D.
Afterwards i tried doing machine -> add and adding the vbox file but it keeps giving me error UUID already exists. What do i have to do to get rid of the existing UUID? Just cutting folder doesnt really work :D
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Same UUID as an existing virtual machine

Post by socratis »

Take a look at the FAQ Moving a VM. Your answer is the next step after what you did (the red letters).
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
urketadic
Posts: 8
Joined: 12. Jul 2016, 23:26

Re: Same UUID as an existing virtual machine

Post by urketadic »

I did that but its still not working.
Will editing xml file maybe fix it? I found a line
<MachineEntry uuid="{uuid}" src="C:\Users\...c path\Ubuntu.vbox"/>
can changing line maybe fix it?

Or maybe restart the computer and then try adding it again?
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Same UUID as an existing virtual machine

Post by socratis »

Of course, if the copy is on the same host as the original VM then VirtualBox will object to your attempt to register the same UUID twice. You must remove the original VM from the manager before the copy can be added (*).

(*) There was a bug in VirtualBox versions prior to v4.3.0 in which the background VBoxSVC process retains a memory of media filenames and UUIDs even after the front end has apparantly removed them. If using an affected version then to work around this you must shut down VirtualBox entirely, wait several seconds or until VBoxSVC unloads, then you can run the GUI again. At this point you should be able to add the VM back without complaint.
You mean that this didn't work for you?
I included the workaround to a known bug, just in case you were running that version of VirtualBox.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
urketadic
Posts: 8
Joined: 12. Jul 2016, 23:26

Re: Same UUID as an existing virtual machine

Post by urketadic »

I got VirtualBox 5.1 for Windows hosts.
What i did was make a copy of VirtualBox VMsit and put it in the location i wanted on D harddisk. And then just removed the old Virtual Box VMsit folder from C hard disk. So just pretty much cut it like the first time.
Then i exit the Virtual Box, and waited for few minutes, and then tried to do Add thing.

I dunno im noob.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Same UUID as an existing virtual machine

Post by socratis »

Your old VM maybe gone from the C drive, but it is not unregistered from VirtualBox. Open VirtualBox Manager. Select the VM you want to remove. Right-click and select "Remove...". You could have selected "Delete all files", but you already did that in Explorer. It doesn't hurt though, so select "Delete all files". Then add your VM from D.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
urketadic
Posts: 8
Joined: 12. Jul 2016, 23:26

Re: Same UUID as an existing virtual machine

Post by urketadic »

Thank you for sticking with me. That worked.

For people that might have simmilar problem in future, this is the solution:
Just make a copy of the VirtualBox VM's folder(Ubuntu/Ubuntu.vbox and .vdi) and paste it on your new location.
Then you can go to the Virtual Box manager and just remove the Virtual machine you created, and then just do Machine -> Add and find the vbox file you pasted earlier.
David_Fixit
Posts: 1
Joined: 26. Mar 2014, 22:40

Re: Same UUID as an existing virtual machine

Post by David_Fixit »

You can run this command twice for your problem virtual machine, saving both UUIDs:
VBoxManage.exe internalcommands sethduuid <vdi file name>

Then edit the problem virtual machine's vbox file.
Replace the UUID after "HardDisk uuid=" with the last generated UUID.
Replace the UUID after "Machine uuid=" with the first generated UUID.
Post Reply