Sunday, November 29, 2009

VirtualBox with remote desktop setup

Once the VM is created use the VMBoxManage command line tool to setup the VRDP authentication mechanism

$ VBoxManage modifyvm --vrdpauthtype external

Using external ties it to the system auth and can use PAM to authenticate users trying to connect. Use null if you dont want to use any authentication.

Next start the VM in headless mode and VRDP enabled using

$ VBoxManage startvm "Windows XP64" --type vrdp

The VM will start up and you can connect to it using Remote Desktop on port 3389.

Some other useful tools:
$ VBoxManage list vms - List all VMs
$ VBoxManage controlvm "Windows XP64" poweroff - Power off the VM