Bienvenido! - Willkommen! - Welcome!

Bitácora Técnica de Tux&Cía., Santa Cruz de la Sierra, BO
Bitácora Central: Tux&Cía.
Bitácora de Información Avanzada: Tux&Cía.-Información
May the source be with you!

Saturday, October 2, 2010

VirtualBox: can not register hard disk

Error: Cannot register the hard disk
When cloning VirtualBox VMs appears following error:
ERROR: Cannot register the hard disk '/home/scol/.VirtualBox/VDI/WinXP-IE7.vdi' with UUID {3858b1b1-c306-4505-8264-235af812f337} because a hard disk '/home/scol/.VirtualBox/VDI/WinXP-IE7.vdi' with UUID {3858b1b1-c306-4505-8264-235af812f337} already exists in the media registry ('/home/scol/.VirtualBox/VirtualBox.xml')
Details: code NS_ERROR_INVALID_ARG (0x80070057), component VirtualBox... 
$ VBoxManage clonehd WinXP-IE7.vdi WinXP-IE8.vdi
A completely ambiguous error message! The solution is to provide an absolute path to the source VDI and target VDIs (leaving the path off the target will put the image in ~/.VirtualBox/HardDisks by default):

$ VBoxManage clonehd $(pwd)/WinXP-IE7.vdi $(pwd)/WinXP-IE8.vdi
pwd print working directory!!!!!!!!!!!! 
     comment:      $(pwd) and `pwd` are equivalent.
----------------------
This worked for me:
$ VBoxManage clonevdi `pwd`/SDisk.vdi `pwd`/DDisk.vdi
assuming you are in the directory for both the source and destination disk 

Better (works in a windows environment):
$ VBoxManage internalcommands sethduuid Windows.vdi
where MYBox.vdi is the name of the virtual HD I copied 

The bug is still present in 3.0.8 and combined with the very ambigous error message it does create a real bad user experience.

No comments: