VirtualBox: Error: Cannot register the hard disk
晚上在作一个实验克隆硬盘时报错
[jean@jeantoe Web.Mysql.Slave]$ VBoxManage clonehd Web.Mysql.Slave.vdi ~/vm/Cspace/
VirtualBox Command Line Management Interface Version 3.0.12
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.
ERROR: Cannot register the hard disk ‘/media/my stage/vm/Cspace/Web.Mysql.Slave/Web.Mysql.Slave.vdi’ with UUID {56ac145d-4d69-4f5e-ad48-4c4f5ad18ef5} because a hard disk ‘/home/jean/vm/Cspace/Web.Mysql.Slave/Web.Mysql.Slave.vdi’ with UUID {56ac145d-4d69-4f5e-ad48-4c4f5ad18ef5} already exists in the media registry (‘/home/jean/.VirtualBox/VirtualBox.xml’)
Details: code NS_ERROR_INVALID_ARG (0x80070057), component VirtualBox, interface IVirtualBox, callee nsISupports
Context: “OpenHardDisk(Bstr(szFilenameAbs), AccessMode_ReadWrite, false, Bstr(“”), false, Bstr(“”), srcDisk.asOutParam())” at line 624 of file VBoxManageDisk.cpp
解决方法为
[jean@jeantoe Web.Mysql.Slave]$ VBoxManage clonehd $(pwd)/Web.Mysql.Slave.vdi $(pwd)/Node1.vdi
VirtualBox Command Line Management Interface Version 3.0.12
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.
0%…10%…20%…30%…40%…50%…60%…70%…80%…90%…100%
Clone hard disk created in format ‘VDI’. UUID: adf201a1-281e-4c8d-9839-b6c9c363590d
[jean@jeantoe Web.Mysql.Slave]$ ls
Node1.vdi Web.Mysql.Slave.vdi