Adding VMs via console

This is for discussing general topics about how to use VirtualBox.
Post Reply
Uhlig
Posts: 4
Joined: 23. Oct 2015, 09:00

Adding VMs via console

Post by Uhlig »

Hi,

I would like to add multiple virtual machines by console commands. Just as I would by clicking Machine --> Add.
The VMs do have snapshots and multiple virtual hard drives attached.

In the end I would like to have those VMs on an external drive and a batch file that does the following:
  • Check: is VirtualBox installed on the system?
  • If not install it
  • Add all virtual machines on the external drive (path relative to the batch file)
Is there a way to do this?
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Adding VMs via console

Post by mpack »

Not completely, not with any feature built into VirtualBox.

You would use your host's scripting language, calling VBoxManage (see user manual).
Uhlig
Posts: 4
Joined: 23. Oct 2015, 09:00

Re: Adding VMs via console

Post by Uhlig »

Checking the installation and finding the paths is of course done externally. But is there a way to add the VMs via the command line?
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Adding VMs via console

Post by mpack »

I've never tried it, but if I did then I guess I'd be looking at "VBoxManage registervm".
Post Reply