RDP in Virtualbox Headless not working

So I'm trying to run a Windows XP headless virtual machine on my FreeBSD server. I have tried to follow: http://www.virtualbox.org/manual/ch07.html#vboxheadless but my client machine (ubuntu) was unable to remote into the installation procedure. In my mind this makes some sense, since it seems odd to be able to remote desktop into that raw DOS style installation.

Anyway, I gave up on that and imported a working VM from my Ubuntu box. Here is the info on that VM:
Code:
Name:            Windows XP FromUbuntu
Guest OS:        Windows XP
UUID:            588cb58d-9a04-455f-92df-550b60925ed8
Config file:     /home/chris/.VirtualBox/Machines/Windows XP FromUbuntu/Windows XP FromUbuntu.xml
Hardware UUID:   588cb58d-9a04-455f-92df-550b60925ed8
Memory size:     1536MB
Page Fusion:     off
VRAM size:       16MB
HPET:            off
Number of CPUs:  2
Synthetic Cpu:   off
CPUID overrides: None
Boot menu mode:  message and menu
Boot Device (1): Floppy
Boot Device (2): DVD
Boot Device (3): HardDisk
Boot Device (4): Not Assigned
ACPI:            on
IOAPIC:          on
PAE:             off
Time offset:     0 ms
RTC:             local time
Hardw. virt.ext: on
Hardw. virt.ext exclusive: on
Nested Paging:   on
Large Pages:     off
VT-x VPID:       on
State:           powered off (since 2011-03-27T13:16:23.000000000)
Monitor count:   1
3D Acceleration: off
2D Video Acceleration: off
Teleporter Enabled: off
Teleporter Port: 0
Teleporter Address: 
Teleporter Password: 
Storage Controller Name (0):            IDE Controller
Storage Controller Type (0):            PIIX4
Storage Controller Instance Number (0): 0
Storage Controller Max Port Count (0):  2
Storage Controller Port Count (0):      2
IDE Controller (0, 0): /home/chris/.VirtualBox/HardDisks/Windows XP.vmdk (UUID: 3de722b0-2c18-4fd3-875d-450da623083f)
IDE Controller (0, 1): Empty
IDE Controller (1, 0): Empty
IDE Controller (1, 1): Empty
NIC 1:           MAC: 080027AD6085, Attachment: NAT, Cable connected: on, Trace: off (file: none), Type: Am79C973, Reported speed: 0 Mbps, Boot 
priority: 0
NIC 1 Settings:  MTU: 0, Socket( send: 64, receive: 64), TCP Window( send:64, receive: 64)
NIC 1 Rule(0):   name = guestrdp, protocol = tcp, host ip = , host port = 3389, guest ip = , guest port = 3389
NIC 2:           disabled
NIC 3:           disabled
NIC 4:           disabled
NIC 5:           disabled
NIC 6:           disabled
NIC 7:           disabled
NIC 8:           disabled
Pointing Device: PS/2 Mouse
Keyboard Device: PS/2 Keyboard
UART 1:          disabled
UART 2:          disabled
Audio:           disabled
Clipboard Mode:  Bidirectional
USB:             enabled
Shared folders:  <none>

Guest:

Configured memory balloon size:      0 MB

As you can see, I have the guestrdp port forwarding. A very useful post here: http://forums.freebsd.org/showthread.php?t=13499&highlight=RDP+Virtualbox

When I attempt
Code:
rdesktop -a 16 -N 192.168.0.43:3389
Autoselected keyboard map en-us
It'll sit there and wait a while... then display this:
Code:
ERROR: Connection closed

There are no other errors flying. Here is the end of the VBox.log file for this virtual machine. It appears to be running just fine.
Code:
00:00:19.570 OHCI: Software reset
00:00:19.570 OHCI: USB Reset
00:00:19.570 OHCI: USB Operational
00:00:19.574 Guest Log: VBoxVideo: using HGSMI
00:00:19.632 PCNet#0: Init: ss32=1 GCRDRA=0x09877420[64] GCTDRA=0x09877020[64]
00:00:19.645 SharedFolders host service: connected, u32ClientID = 1
00:00:19.736 PCNet#0: Init: ss32=1 GCRDRA=0x09877420[64] GCTDRA=0x09877020[64]
00:00:19.870 Guest Log: VBoxDisp[0]: VBVA enabled
00:00:19.870 Display::handleDisplayResize(): uScreenId = 0, pvVRAM=000000080715\
4000 w=1024 h=768 bpp=32 cbLine=0x1000
00:00:20.014 Guest Log: VBoxService.exe: 3.2.12 r68302 started. Verbose level =\
 0
00:00:20.567 Guest Log: VBOXNP: DLL loaded.
00:00:20.572 SharedFolders host service: request to map folder Data
00:00:20.572 SharedFolders host service: map operation result VERR_FILE_NOT_FOU\
ND.
00:00:20.592 SharedFolders host service: request to map folder MovEncode
00:00:20.593 SharedFolders host service: map operation result VERR_FILE_NOT_FOU\
ND.
00:00:20.608 NAT: adding domain name HOME to search list
00:00:20.608 NAT: DHCP offered IP address 10.0.2.15
00:00:20.609 OHCI: USB Suspended
00:00:20.674 PCNet#0: Init: ss32=1 GCRDRA=0x09877420[64] GCTDRA=0x09877020[64]
00:00:20.681 PCNet#0: Init: ss32=1 GCRDRA=0x09877420[64] GCTDRA=0x09877020[64]
00:00:22.671 Guest Log: VBoxTray: 3.2.12 r68302 started.
00:00:22.812 Starting host clipboard service
00:00:22.812 ClipConstructX11: X11 DISPLAY variable not set -- disabling shared\
 clipboard
00:00:22.826 Guest Additions capability report: (0x5) seamless: yes, hostWindow\
Mapping: no, graphics: yes
00:00:32.404 PCNet#0: Init: ss32=1 GCRDRA=0x09877420[64] GCTDRA=0x09877020[64]
00:01:22.582 Guest Log: VBOXNP: DLL loaded.

Is there a log I can look at to see what's going on with rdesktop?
There isn't a firewall running on the FreeBSD server, and the hosts.allow is currently allowing all.
 
Does your installation of Windows XP support RDP? If I remember correctly only the pro version does.

Why not just use VNC?
 
As I understand it, only the PUEL version of VirtualBox has support for RDP built-in. The OSE version in ports does have a built-in VNC server if configured that way. Check the run-time options to VBoxHeadless.

Adam
 
In your working config, you are forwarding port 3389 in the NAT rules. So I assume this is why it is working.

Code:
NIC 1 Rule(0):   name = guestrdp, protocol = tcp, host ip = , host port = 3389, guest ip = , guest port = 3389

So in any future VMs, make sure that this is added.
 
Thanks for the responses.
I just ended up creating a VM in Ubuntu and exporting it to the FreeBSD box.
I then just used VNC to connect to it.

It now works just fine this way.
 
Back
Top