Download Sun VirtualBox User Manual - Oracle Software Downloads

Transcript
7 Alternative front-ends; remote virtual machines
7.4.2 VBoxHeadless, the VRDP-only server
While the VRDP server that is built into the VirtualBox GUI is perfectly capable of
running virtual machines remotely, it is not convenient to have to run VirtualBox if
you never want to have VMs displayed locally in the first place. In particular, if you
are running servers whose only purpose is to host VMs, and all your VMs are supposed
to run remotely over VRDP, then it is pointless to have a graphical user interface on
the server at all – especially since, on a Linux or Solaris host, VirtualBox comes with
dependencies on the Qt and SDL libraries, which is inconvenient if you would rather
not have the X Window system on your server at all.
VirtualBox therefore comes with yet another front-end called VBoxHeadless, which
produces no visible output on the host at all, but instead only delivers VRDP data.2
To start a virtual machine with VBoxHeadless, you have two options:
• You can use VBoxManage startvm <vmname> --type vrdp. The extra --type
option causes the VirtualBox core to use VBoxHeadless as the front-end to the
internal virtualization engine.
• The recommended way, however, is to use VBoxHeadless directly, as follows:
VBoxHeadless --startvm <uuid|name>
This is the recommended way, because when starting the headless interface
through VBoxManage, you will not be able to view or log messages that
VBoxHeadless may have output on the console. Especially in case of startup
errors, such output might be desirable for problem diagnosis.
Note that when you use VBoxHeadless to start a VM, since the headless server has
no other means of output, the built-in VRDP server will always be enabled, regardless
of whether you have enabled the VRDP server in the VM’s settings. If this is undesirable
(for example because you want to access the VM via ssh only), start the VM like this:
VBoxHeadless --startvm <uuid|name> --vrdp=off
To have the VRDP server use the setting from the VM configuration, as the other frontends would, use this:
VBoxHeadless --startvm <uuid|name> --vrdp=config
7.4.3 Step by step: creating a virtual machine on a headless
server
The following instructions may give you an idea how to create a virtual machine on a
headless server over a network connection. We will create a virtual machine, establish
a VRDP connection and install a guest operating system – all without having to touch
the headless server. All you need is the following:
2 Before
VirtualBox 1.6, the headless server was called VBoxVRDP. For the sake of backwards compatibility,
the VirtualBox installation still installs an executable with that name as well.
94