I am currently trying to learn how to run VMs on a headless machine and connect to them with rdesktop.
For a first test I installed Virtualbox 4.0.6 (latest version, from the oracle website) on a Slackware -current 32 bit machine that doesn't run headless, so that I can test the VM in the "normal" mode. Installation went fine, no problems here.
After installation I created a VM (for use with Puppy Linux as a test) with the following commands:
VBoxManage createvm --name "Puppy" --ostype "Linux26" --register
VBoxManage modifyvm "Puppy" --memory 256 --acpi on --boot1 dvd --nic1 nat
VBoxManage storagectl "Puppy" --name "IDE Controller" --add ide --controller PIIX4
VBoxManage storageattach "Puppy" --storagectl "IDE Controller" --port 0 --device 0 --type dvddrive --medium /home/tobi/lupu-520.iso
VBoxManage modifyvm "Puppy" --vrdeauthtype none
All commands worked I had no error-messages.
Running the VM from the host (means not in headless mode) works flawlessly.
I then started the VM in headless mode with
VBoxHeadless --startvm "Puppy"
Here also no error messages, the output was:
Oracle VM VirtualBox Headless Interface 4.0.6
(C) 2008-2011 Oracle Corporation
All rights reserved.
and if I start the GUI of Virtualbox it shows a running Puppy Linux in the preview window.
I then tried to connect to the machine with
rdesktop -a 16 -N localhost
rdesktop -a 16 -N localhost:3389
from the host. I also tried it with
rdesktop -a 16 -N dragon
rdesktop -a 16 -N dragon:3389
from a remote machine (Slackware64 -current).
All I get every time is
ERROR: connect: Connection refused
I also tried it with KRDC and all I get is a blue window, no error messages.
I looked at the settings of the VM using the Virtualbox GUI and set the port manually to 3389, because the port was not specified there. That didn't help.
I am somewhat stuck here, I googled for that problem and searched on this forum, but I didn't find a solution.
May be someone had the same problem and can point me to a solution.
Thanks in advance.