The controlvm
subcommand allows you
to change the state of a virtual machine that is currently running. The
following can be specified:
VBoxManage controlvm <vm>
pause
temporarily puts a virtual machine on hold,
without changing its state for good. The VM window will be painted
in gray to indicate that the VM is currently paused. (This is
equivalent to selecting the "Pause" item in the "Machine" menu of
the GUI.)
Use VBoxManage controlvm <vm>
resume
to undo a previous
pause
command. (This is equivalent
to selecting the "Resume" item in the "Machine" menu of the
GUI.)
VBoxManage controlvm <vm>
reset
has the same effect on a virtual machine as
pressing the "Reset" button on a real computer: a cold reboot of the
virtual machine, which will restart and boot the guest operating
system again immediately. The state of the VM is not saved
beforehand, and data may be lost. (This is equivalent to selecting
the "Reset" item in the "Machine" menu of the GUI.)
VBoxManage controlvm <vm>
poweroff
has the same effect on a virtual machine
as pulling the power cable on a real computer. Again, the state of
the VM is not saved beforehand, and data may be lost. (This is
equivalent to selecting the "Close" item in the "Machine" menu of
the GUI or pressing the window's close button, and then selecting
"Power off the machine" in the dialog.)
After this, the VM's state will be "Powered off". From there, it can be started again; see Section 8.10, “VBoxManage startvm”.
VBoxManage controlvm <vm>
savestate
will save the current state of the VM to
disk and then stop the VM. (This is equivalent to selecting the
"Close" item in the "Machine" menu of the GUI or pressing the
window's close button, and then selecting "Save the machine state"
in the dialog.)
After this, the VM's state will be "Saved". From there, it can be started again; see Section 8.10, “VBoxManage startvm”.
VBoxManage controlvm <vm> teleport
--hostname <name> --port <port> [--password
<password>]
makes the machine the source of a
teleporting operation and initiates a teleport to the given target.
See Section 7.2, “Teleporting” for an introduction. If the
optional password is specified, it must match the password that was
given to the modifyvm
command for
the target machine; see Section 8.7.5, “Teleporting settings” for details.
A few extra options are available with
controlvm
that do not directly affect the
VM's running state:
The setlinkstate<1-N>
operation connects or disconnects virtual network cables from their
network interfaces.
nic<1-N>
null|nat|bridged|intnet|hostonly
: With this, you can
set, for each of the VM's virtual network cards, what type of
networking should be available. They can be not connected to the host
(null
), use network address
translation (nat
), bridged networking
(bridged
) or communicate with other
virtual machines using internal networking
(intnet
) or host-only networking
(hostonly
). These options correspond
to the modes which are described in detail in Section 6.2, “Introduction to networking modes”.
usbattach
and
usbdettach
make host USB devices
visible to the virtual machine on the fly, without the need for
creating filters first. The USB devices can be specified by UUID
(unique identifier) or by address on the host system.
You can use VBoxManage list
usbhost
to locate this information.
vrde on|off
lets you enable or
disable the VRDE server, if it is installed.
vrdeport default|<ports>
changes the port or a range of ports that the VRDE server can bind to;
"default" or "0" means port 3389, the standard port for RDP. For
details, see the description for the
--vrdeport
option in Section 8.7.3, “Serial port, audio, clipboard, remote desktop and USB
settings”.
setvideomodehint
requests that
the guest system change to a particular video mode. This requires that
the Guest Additions be installed, and will not work for all guest
systems.
The setcredentials
operation is
used for remote logons in Windows guests. For details, please refer to
Section 9.2, “Automated guest logons”.
The guestmemoryballoon
operation changes the size of the guest memory balloon, that is,
memory allocated by the VirtualBox Guest Additions from the guest
operating system and returned to the hypervisor for re-use by other
virtual machines. This must be specified in megabytes. For details,
see Section 4.8.1, “Memory ballooning”.
The cpuexecutioncap
<1-100>
: This operation controls how much cpu
time a virtual CPU can use. A value of 50 implies a single virtual CPU
can use up to 50% of a single host CPU.