Tag Archives: internalcommands

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.

virtualbox_logo

Ref: http://superuser.com/questions/529149/how-to-compact-virtualboxs-vdi-file-size