Page 1 of 1

VBoxManage registervm

Posted: 18. Jan 2011, 18:10
by pepak
The documenation states the following about vboxmanage registervm:
Documentation wrote:The registervm command allows you to import a virtual machine definition in an XML file into VirtualBox. The machine must not conflict with one already registered in VirtualBox and it may not have any hard or removable disks attached. It is advisable to place the definition file in the machines folder before registering it.
I wonder, is there any reason for the "may not have any hard or removable disks attached" part? I ask because I am about to move several virtual machines, including their hard disks, around and the registervm function of VBoxManage would seem the natural solution. Except it can't do it, apparently. Is is simply because the registration was a far more difficult process with pre-4.0 versions of Virtual Box and this requirement is simply a remainder of these good old days? Because if it is, I guess I can simply register the machine manually, by writing to the configuration .xml - but maybe there is some other reason why the registration can't be done and it might affect the manual registration, too.

Please do not ask me why I want to move machines around or why I am not using the OVF format.

Thank you.

Re: VBoxManage registervm

Posted: 18. Jan 2011, 18:22
by Perryg
I don't care why you want to do anything. It's your system, but I can tell you why it is somewhat more difficult in this version (at least IMHO).
As you can see the entire storage section was re-written to support portability. To be able to retain backward compatibility to the old structure it needed to allow for dual xml structure in case you decided to regress back to a previous version. OK that's cool, but I don't want to regress, so I manually corrected the situation and put everything in the new structure. Not too hard, but I tried the editing of the xml and found that to be more work than just removing the VM's and recreate (adding the existing *.VDI). If you have snapshots and the like though you would need to edit the xml and this could be a long and drawn out process.

Re: VBoxManage registervm

Posted: 18. Jan 2011, 18:26
by pepak
Actually, I just tried to register the machine with attached disks, and it worked. Including the snapshots!

Re: VBoxManage registervm

Posted: 18. Jan 2011, 18:30
by Perryg
You're lucky. I tried that on a few and it didn't work properly. Actually that may have been with the beta.... Probably fixed then.
Still, once converted you can not regress to older version (easily).