Fix “VBoxManage: error: Cannot register the hard disk … because a hard disk … already exists”


If you get an error like this when running a vboxmanage command:

VBoxManage: error: Cannot register the hard disk 'disk.vdi' {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} because a hard disk 'disk.vdi' with UUID {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} already exists

You can change the UUID of the hard disk:

vboxmanage internalcommands sethduuid disk.vdi

Or you may bypass it by using the given UUID instead of the hard disk vdi file. For example:

vboxmanage modifyhd {6bc03a41-794b-4a84-adaf-789436919417} --compact

Note: vboxmanage is for GNU/Linux and Windows, in Mac OS X it’s VBoxManage.

Happy Coding 🙂

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s