Terry : VirtualBox Headless

VirtualBox Headless - The Remote Desktop Server

While any VM started from the VirtualBox Manager is capable of running virtual machines remotely, it is not convenient to have to run the full-fledged GUI if you never want to have VMs displayed locally in the first place. In particular, if you are running server hardware 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, the VirtualBox manager comes with dependencies on the Qt and SDL libraries. This 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. This front-end has no dependencies on the X Window system on Linux and Solaris hosts.

To start a virtual machine with VBoxHeadless, you have three options

1. VBoxManage

VBoxManage startvm "VM name" --type headless

NOTE: The extra --type option causes VirtualBox to use VBoxHeadless as the front-end to the internal virtualization engine instead of the Qt front-end.

2. One alternative is to use VBoxHeadless directly, as follows

VBoxHeadless --startvm <uuid|name>

This way of starting the VM helps troubleshooting problems reported by VBoxManage startvm ... because you can see sometimes more detailed error messages, especially for early failures before the VM execution is started.

In normal situations VBoxManage startvm is preferred since it runs the VM directly as a background process which has to be done explicitly when directly starting VBoxHeadless.

3. The other alternative is to start VBoxHeadless from the VirtualBox Manager GUI, by holding the Shift key when starting a virtual machine.

Note that when you use VBoxHeadless to start a VM, since the headless server has no other means of output, the VRDP server will always be enabled, regardless of whether you had 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> --vrde off

To have the VRDP server enabled depending on the VM configuration, as the other front-ends would, use this

VBoxHeadless --startvm <uuid|name> --vrde config

If you start the VM with VBoxManage startvm ... then the configuration settings of the VM are always used.

Reference

Step by step: creating a virtual machine on a headless server