« HOWTO:Reinstall Grub2 on UbuntuHOWTO: Remove RAID Arrays »

HOWTO: Startup and Connect to a Remote VirtualBox Machine

25/12/09

HOWTO: Startup and Connect to a Remote VirtualBox Machine

Ok, so you have a working VBox machine and you want to run it on a host server, This allows you to connect to it remotely. Until VBoxWeb get written here is a quick and dirty way.

To make the remote connect a little more secure you can stop any old person connecting in with out authentication by configuring vrdp port and vrdpauthtype. By using the auth type of external only users who can be verified by the host server can connect using rdesktop. They can still connect via other methods if setup in the guest such as ssh or VNC.

First we will set the port to 5001 and turn on authtype external.

VBoxManage modifyvm --vrdpport 5001 vmKarmicServer
VBoxManage modifyvm --vrdpauthtype external vmKarmicServer

To run the VBox guest on the host you need a coomand line similar to the following. The output below is what you would see if you ran it in a terminal and then later stopped the guest.

VBoxHeadless --startvm vmKarmicServer --vrdp=config

VirtualBox Headless Interface 3.1.2 


(C) 2008-2009 Sun Microsystems, Inc. 
All rights reserved. 
 
Listening on port 5001. 
VRDP server is inactive. 

The following can be setup in the rc.local so that the gest will automatically restart when the host is rebooted.

sudo nano /etc/rc.local
su vboxuser -c "VBoxHeadless --startvm vmHardyServer --vrdp=config" > /dev/null 2>&1

Change "vboxuser" to any user you want to run the server. To connect to the VBox guest via rdesktop the following works for me.

rdesktop-vrdp -u vboxuser -p - vboxHostserver:5001
Autoselected keyboard map en-gb
Password:  

No feedback yet

Here are a collection of Mini-HOWTOs some of which are too short even for that grand title. I keep them around as it is easier to remember where to look these up that to remember the content of the mini-HOWTO

Search

Contents

powered by b2evolution free blog software