beautypg.com

2 using vboxmanage to control virtual machines, Using vboxmanage to control virtual machines – Sun Microsystems VIRTUALBOX VERSION 3.1.0_BETA2 User Manual

Page 97

background image

7 Alternative front-ends; remote virtual machines

7.2 Using VBoxManage to control virtual machines

This section will give you a brief introduction to VBoxManage and how you can use it
to create and operate virtual machines.

In essence, VBoxManage supports everything that our graphical user interface al-

lows you to do with the click of a button. VBoxManage supports a lot more than that,
however. It exposes really all the features of the virtualization engine, even those that
cannot (yet) be accessed from the GUI.

You will need to use the command line if you want to

• use a different user interface than the main GUI (for example, VBoxSDL or the

VBoxHeadless server);

• control some of the more advanced and experimental configuration settings for

a VM.

There are two main things to keep in mind when using VBoxManage: First,

VBoxManage

must always be used with a specific “subcommand”, such as “list” or

“createvm” or “startvm”. All the subcommands that VBoxManage supports are de-
scribed in detail in chapter

8

,

VBoxManage reference

, page

106

.

Second, most of these subcommands require that you specify a particular virtual

machine after the subcommand. There are two ways you can do this:

• You can specify the VM name, as it is shown in the VirtualBox GUI. Note that

if that name contains spaces, then you must enclose the entire name in dou-
ble quotes (as it is always required with command line arguments that contain
spaces).

For example:

VBoxManage startvm "Windows XP"

• You can specify the UUID, which is the internal unique identifier that VirtualBox

uses to refer to the virtual machine. Assuming that the aforementioned VM
called “Windows XP” has the UUID shown below, the following command has
the same effect as the previous:

VBoxManage startvm 670e746d-abea-4ba6-ad02-2a3b043810a5

You can type VBoxManage list vms to have all currently registered VMs listed

with all their settings, including their respective names and UUIDs.

Some typical examples of how to control VirtualBox from the command line are

listed below:

• To create a new virtual machine from the command line and immediately reg-

ister it with VirtualBox, use VBoxManage createvm with the --register
option,

1

like this:

1

For details, see chapter

8.4

,

VBoxManage createvm

, page

113

.

97