Problems connecting to vrdp on VirtualBox

3

1

I'm running VirtualBox 4.1.6 on an Ubuntu 11.10 host machine. The extension pack is installed. The guest is Ubuntu 11.10 as well. I'm now trying to connect via vrdp to a vm that i created. I configured the vm to allow remote connections on port 5000 via VirtualBox Manager.

After starting the VM in headless mode using VBoxHeadless --startvm <name> the vm starts and logs

VRDE server is listening on port 5001

I tried to connect locally using rdesktop, as mentioned as a test in the VirtualBox manual, with the command rdesktop localhost:5001 but to no avail. I'm getting the following errors:

ERROR: send: Datenübergabe unterbrochen (broken pipe)
disconnect: Server initiated disconnect

I also tried to connect from a windows machine in my network, doesn't work as well (the mstsc error messages are expressionless.

I tried to start the VM normally using the VirtualBox Manager, booting it up until login screen, and then tried to connect with rdp, but it shows the same errors.

I couldn't find something like this solved on the internet. So anyone has a clue what i'm doing wrong?

okrumnow

Posted 2011-12-19T09:08:27.803

Reputation: 131

Answers

1

In my case it was a CentOS 6.2 host and I was using it headless, doing all the setup (creating disks etc) from the command line, so the guest OS was not even anything yet. When starting the virtual machine, and connecting by rdesktop, I also got the above error (english version):

ERROR: send: Broken pipe
disconnect: Server initiated disconnect.

I checked /var/log for files modified around that time, and sure enough, /var/log/secure had the following:

Mar 31 21:05:18 vm_name VBoxHeadless: pam_unix(login:auth): authentication failure; logname=my_username uid=1027 euid=1027 tty= ruser= rhost=  user=virtualbox

When adding the virtualbox user (under which the VMs were created and run) I had never set a password. Or depending on your distro, you at least need to delete the !! from the user's line in /etc/shadow.

Also, from the client, if I just did rdesktop hostname, it gave the same error because it was trying my user. I had to do rdesktop -u virtualbox -p - hostname where virtualbox is the user I created on the host machine to run the virtual machines.

Martin Moops

Posted 2011-12-19T09:08:27.803

Reputation: 21