cannot register hard disk- uuid already exists, etc

Discussions related to using VirtualBox on Windows hosts.
Post Reply
ihatelolcats
Posts: 11
Joined: 7. Jun 2009, 18:41
Primary OS: MS Windows Vista
VBox Version: OSE other
Guest OSses: ubuntu, vista, win 7

cannot register hard disk- uuid already exists, etc

Post 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?
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

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

Post 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.
ihatelolcats
Posts: 11
Joined: 7. Jun 2009, 18:41
Primary OS: MS Windows Vista
VBox Version: OSE other
Guest OSses: ubuntu, vista, win 7

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

Post by ihatelolcats »

thanks, i got it working. i thought i tried that yesterday but i guess not
uhebeisen
Posts: 8
Joined: 27. Dec 2009, 18:24
Primary OS: Mac OS X Leopard
VBox Version: PUEL
Guest OSses: WinXP-SP3, LinuxMint

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

Post by uhebeisen »

hi,
I am having the same situation here:

Code: Select all

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.
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

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

Post 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.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
uhebeisen
Posts: 8
Joined: 27. Dec 2009, 18:24
Primary OS: Mac OS X Leopard
VBox Version: PUEL
Guest OSses: WinXP-SP3, LinuxMint

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

Post by uhebeisen »

Sasquatch,
great that help! using this cryptic numbers instead of the filename and modifyhd command worked smooth.

thank you.
Oracleb0y
Posts: 1
Joined: 6. Mar 2017, 23:10

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

Post 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

$ vboxmanage modifyhd disk b78e3841-fb57-48b1-a867-26fa5b16647d --resize 40960
Best thread on the subject!
Faraday
Posts: 1
Joined: 11. Jul 2018, 17:40

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

Post by Faraday »

Although very old topic but I might add how i got this issue solved

1- Copy C:\Users\<yourUserName>\VirtualBox VMs
2- Past it to any Directory you would like could be an External HDD
3- VirtualBox > File > Preference > General > Default Machine Folder : < Change it to where ever you moved VirtualBox VMs
*4- Delete Everything in " C:\Users\<yourUserName>\VirtualBox VMs"
4- VirtualBox > Create > Create New > ......... > Hard disk > Use an existing virtual hard disk file > Choose the New Directory with VirtualBox VMs > Find file .vdi


Done !!!
Post Reply