7 Remote virtual machines You can use VBoxManage startvm "VM name" --type headless The extra --type option causes VirtualBox to use VBoxHeadless as the front-end to the internal virtualization engine instead of the Qt front-end. The alternative is to use VBoxHeadless directly, as follows: VBoxHeadless --startvm uuid|name This way of starting the VM is preferred because you can see more detailed error messages, especially for early failures before the VM execution is started. If you have trouble with VBoxManage startvm, it can help greatly to start VBoxHeadless directly to diagnose the problem cause. 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 7.1.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 an RDP connection and install a guest operating system all without having to touch the headless server. All you need is the following: 1. VirtualBox on a server machine with a supported host operating system. The VirtualBox extension pack for the VRDP server must be installed (see the previous section). For the following example, we will assume a Linux server. 2. An ISO file accessible from the server, containing the installation data for the guest operat- ing system to install (we will assume Windows XP in the following example). 3. A terminal connection to that host through which you can access a command line (e.g. via ssh). 4. An RDP viewer on the remote client see chapter 7.1.1, Common third-party RDP viewers, page 90 above for examples. Note again that on the server machine, since we will only use the headless server, neither Qt nor SDL nor the X Window system will be needed. 1. On the headless server, create a new virtual machine: VBoxManage createvm --name "Windows XP" --ostype WindowsXP --register Note that if you do not specify --register, you will have to manually use the registervm command later. Note further that you do not need to specify --ostype, but doing so selects some sane default values for certain VM parameters, for example the RAM size and the type of the virtual network device. To get a complete list of supported operating systems you can use 92
Previous Page Next Page