Page 1 of 1

cannot register hard disk- uuid already exists, etc

PostPosted: 6. Mar 2011, 04:00
by ihatelolcats
im sure this has been asked before but i cant find a clear answer after a few searches
i moved my vdi file to a different physical disk and now i can't add it because the uuid is already registered with windows.
how do i fix the problem?

Re: cannot register hard disk- uuid already exists, etc

PostPosted: 6. Mar 2011, 05:05
by Perryg
It is VirtualBox that is giving this error. You need to remove it from the media manager first. Then you can add it back from the new location. If you have snapshots though it will not work just by moving it unless you are using version 4.0.*

Make a backup of everything first to protect the guest in case you have a failure.

Re: cannot register hard disk- uuid already exists, etc

PostPosted: 6. Mar 2011, 22:20
by ihatelolcats
thanks, i got it working. i thought i tried that yesterday but i guess not

Re: cannot register hard disk- uuid already exists, etc

PostPosted: 27. Mar 2011, 14:52
by uhebeisen
hi,
I am having the same situation here:
Code: Select all   Expand viewCollapse view
uhs-MBpro:HardDisks uheb$ VBoxManage modifyhd Win-XP2.vdi --resize 20480
VBoxManage: error: Cannot register the hard disk '/Users/uheb/Library/virtualbox/harddisks/Win-XP2.vdi' {df175e62-a73c-420f-9f5c-e54e55560bdf} because a hard disk '/Users/uheb/Library/VirtualBox/HardDisks/Win-XP2.vdi' with UUID {df175e62-a73c-420f-9f5c-e54e55560bdf} already exists
VBoxManage: error: Details: code NS_ERROR_INVALID_ARG (0x80070057), component VirtualBox, interface IVirtualBox, callee nsISupports
Context: "OpenMedium(Bstr(pszFilenameOrUuid).raw(), enmDevType, AccessMode_ReadWrite, pMedium.asOutParam())" at line 209 of file VBoxManageDisk.cpp

can someone explain me how to remove the hard disk from the media manager please. I have done this - or at least I thought I'd have but the modifyhd command constantly brings this message in the Terminal window
Host: MacOSX
VB 4.0.4
Guest: WinXP (created in a pre v4 VB).

I was trying to expand the harddisk size without success (the command worked, I saw 20GB in the VB Manager but I wasn't able to expand the harddisk in Windows (maybe because of the snapshots?). Fiddling around with gparted and the Windows tools (diskpart, compmgmt) didn't help so I gave up and restored the folder VirtualBox*1) (within the Library folder) from my time machine. Next I deleted all the snapshots and checked that the VM "WinXP" still was running with my current settings (-> OK).
Now I thougt I could start over with all the instructions on the web (modifyhd, using gparted) to get a bigger harddisk. But now I am stuck with this error :?

*1): I did this in two steps, first restoring the Win-XP2.vdi (harddisk-file) which results in a lot of error messages in VM Manger and then restoring all the files in the VirtualBox folder plus the folder Win-XP (virtual machine) with all the files in it.

Re: cannot register hard disk- uuid already exists, etc

PostPosted: 27. Mar 2011, 14:56
by Sasquatch
Copy the UUID of the VDI you get in the error and use that instead of the filename to enlarge the disk with modifyhd.

Re: cannot register hard disk- uuid already exists, etc

PostPosted: 27. Mar 2011, 15:36
by uhebeisen
Sasquatch,
great that help! using this cryptic numbers instead of the filename and modifyhd command worked smooth.

thank you.

Re: cannot register hard disk- uuid already exists, etc

PostPosted: 6. Mar 2017, 23:14
by Oracleb0y
UUID is a great tip!

First step as above was to release the .vdi from Virtualbox Virtual Manager.
Also, modifyhd has operators between that for [disk|dvd|floppy] <uuid|filename>

So was getting the errors as the users above but it took after specifying disk:
Code: Select all   Expand viewCollapse view
$ vboxmanage modifyhd disk b78e3841-fb57-48b1-a867-26fa5b16647d --resize 40960


Best thread on the subject!