VBoxHeadless - Running Virtual Machines With VirtualBox 3.1 On A Headless Ubuntu 9.10 Server - Page 2

4 Connecting To A VM From A Remote Desktop

4.1 Windows XP

You can use the built-in Remote Desktop Connection utility to connect to the VM:

Type in the hostname or IP address of the host (not the guest!):

And voilà, you should be connected to the VM:


4.2 Linux

On Linux desktops, you can use the rdesktop command to connect to the VM. Open a terminal (on Ubuntu, for example, it's under Applications > Accessories > Terminal)...

... and type in the following command:

rdesktop -a 16

( is the host IP address, not the one of the guest - replace it with your own IP address or hostname; -a 16 means 16 bit colour depth.)

And voilà, you should be connected to the VM:


Falko Timme

About Falko Timme

Falko Timme is an experienced Linux administrator and founder of Timme Hosting, a leading nginx business hosting company in Germany. He is one of the most active authors on HowtoForge since 2005 and one of the core developers of ISPConfig since 2000. He has also contributed to the O'Reilly book "Linux System Administration".

Share this page:

Suggested articles

4 Comment(s)

Add comment


By: Charley

Wouldn't it be easier to install X and do this graphically, then set Ubuntu not to run X on startup? When you need to make changes, just start x and go into the gui. Otherwise, the gui doesn't run.


Even better: when running Linux as desktop or have a X Window server available: ssh -X to the server and then run the GUI. This way, you don't have to have full X on the server.

By: Fredrik

Thanks for the guide!

 One questions springs to mind: if I have a host running several guests at once, how do I control which of them to connect to via RDP?



By: dahas

Easy just type:

VBoxHeadless --help
VirtualBox Headless Interface 3.1.2
(C) 2008-2009 Sun Microsystems, Inc.
All rights reserved.

Unknown option: --help

   -s, -startvm, --startvm <name|uuid>   Start given VM (required argument)
   -v, -vrdp, --vrdp on|off|config       Enable (default) or disable the VRDP
                                         server or don't change the setting
   -p, -vrdpport, --vrdpport <ports>     Comma-separated list of ports the VRDP
                                         server can bind to. Use a dash between
                                         two port numbers to specify a range
   -a, -vrdpaddress, --vrdpaddress <ip>  Interface IP the VRDP will bind to
   -c, -capture, --capture               Record the VM screen output to a file
   -w, --width                           Frame width when recording
   -h, --height                          Frame height when recording
   -r, --bitrate                         Recording bit rate when recording
   -f, --filename                        File name when recording.  The codec
                                         used will be chosen based on the
                                         file extension


VBoxHeadless --startvm <VM> -p 2222

on windows remote desktop type ip followd by port number like this