What's the converse of showvminfo --machinereadable?

This is for discussing general topics about how to use VirtualBox.
Post Reply
Steve Prior
Posts: 16
Joined: 2. Aug 2012, 17:32

What's the converse of showvminfo --machinereadable?

Post by Steve Prior »

I'm looking for a nice way to batch move a VM from one machine to another where the VM uses an iSCSI target (this means no export/import).
VBoxManage showvminfo --machinereadable <name> sounds promising, but I can't find any form of createvm which uses the "machine readable" form as its input. Wouldn't it be an obvious and easy addition for createvm to be able to input the machine readable form output by showvminfo?
noteirak
Site Moderator
Posts: 5231
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7
Contact:

Re: What's the converse of showvminfo --machinereadable?

Post by noteirak »

What about simply removing the VM from one side and adding it to the other, since I guess both hosts can access the iSCSI disk?
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
Steve Prior
Posts: 16
Joined: 2. Aug 2012, 17:32

Re: What's the converse of showvminfo --machinereadable?

Post by Steve Prior »

I don't completely understand your response. What is "simply removing the VM from one side and adding it to the other"? Doesn't that mean I have to create a roughly identical VM on the new host (and at least shutting it down on the old one)? That would seem to be done with VBoxManage createvm and modify commands, but wouldn't it make more sense for there to exist a form of the VBoxManage command that would take the machine readable output of showvminfo as its input? That just seems logical to me.
noteirak
Site Moderator
Posts: 5231
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7
Contact:

Re: What's the converse of showvminfo --machinereadable?

Post by noteirak »

Your VM folder already contains the VM definition file, with all the infos, and the disks for the data. So by default in 4.x, your VM is contained in a single folder that you can transport easily.
In Virtualbox, you have a "Add VM" function (called registervm in vboxmanage and "Add..." in the GUI) to import this definition file and have that VM appear on the other host.

Be sure that when you do that, you also un-register that VM on the original host (unregister in vboxmanage, Delete | Do not delete files in the GUI) or you may run into permissions issues.
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
Post Reply