VBoxHeadless - Running Virtual Machines With VirtualBox 4.0 On A Headless Debian Squeeze 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 192.168.0.100

(192.168.0.100 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:

 

4.3 If The Remote Desktop Connection Doesn't Work...

If the remote desktop connection doesn't work, you've probably missed the step where I install the VirtualBox extension pack in chapter 2. Please install the extension pack now, stop your virtual machine (see chapter 3.3), and modify your virtual machine to accept remote desktop connections:

$ VBoxManage modifyvm "Debian Squeeze Server" --vrde on

(If the extension pack is already installed when you create your virtual machine, remote desktop connections are automatically enabled.)

Then start your virtual machine again.

 

Share this page:

1 Comment(s)

Add comment

Please register in our forum first to comment.

Comments

By:

This might help someone
To have the VM's boot at startup follow this...
as root user
#crontab -e
extract of crontab
.........................
@reboot sleep 60 ; sudo -u "input here user account" VBoxHeadless -startvm "input here vm name"
.........................
what this does?:
@reboot = when the system is started it runs this command
sleep 60 = waits for the time allocated in this case 60 to start the vm (seconds i believe but thats a total guess)
sudo -u = the following name is the user account which has the vm registered under them
VBoxHeadless = no video output but it is accessible by RDP (2 ways one with the ip of the host (no username or password required) or ip of the guest which is standard access via RDP (username and password)
If we don't add sleep 60 you get the following error:
.............................................................................
WARNING: The vboxdrv kernel module is not loaded. Either there is no module
         available for the current kernel (2.6.32-5-amd64) or it failed to
         load. Please recompile the kernel module and install it by
           sudo /etc/init.d/vboxdrv setup
         You will not be able to start VMs until this problem is fixed.
VBoxHeadless: Error -1908 in suplibOsInit!
VBoxHeadless: Kernel driver not installed
VBoxHeadless: Tip! Make sure the kernel module is loaded. It may also help to reinstall VirtualBox.
.............................................................................
Hopefully this can help someone else, took me around 10 hours to finally figure out how to do this in Debian where as CentOS you could add it without the sleep function