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:


5 Links

Share this page:

6 Comment(s)

Add comment


From: amldc at: 2010-02-06 22:58:18

I can't install virtualbox 3.1 with karmic repository but it's fine with jauny one (on Ubuntu 9.10 64bit):

deb http://download.virtualbox.org/virtualbox/debian jaunty non-free

From: Anonymous at: 2010-02-03 01:03:47

I recommend a little bit change, from the line:

"...In addition to that copy the examplevm.vdi file from the old VDI directory to the new one (e.g. /home/administrator/.VirtualBox/VDI/examplevm.vdi)..."

To something like:

"You can copy the virtual hard disk (.vdi file) by using: VBoxManage clonevdi [source] [dest]"

As explained in:

+ http://sendderek.wordpress.com/2007/11/18/how-to-properly-backup-a-virtualbox-machine-vdi/
+ http://ubuntuforums.org/archive/index.php/t-553326.html

Just for less headache for you :)

From: Charley at: 2010-02-04 07:48:39

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.

From: at: 2010-02-12 18:47:08

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.

From: Fredrik at: 2010-02-03 09:58:44

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?



From: dahas at: 2010-02-14 19:31:50

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