Why can't I connect to my VirtualBox using Remote Desktop?

12

3

Here is my setup:

  • Everything in running on a single machine, under Mac OS X Snow Leopard.
  • I am running Windows 7 in VirtualBox 3.0.10.
  • In the VirtualBox settings, under Display, Remote Display, I checked "Enable server", and kept the default port (3389). Under Network, I use the Bridge Adapter, so the VirtualBox gets an IP using DHCP, just like OS X does.
  • After starting Windows in VirtualBox, I run ipconfig and see that the IP is 192.168.0.181.
  • From the OS X command line, I can successfully ping 192.168.0.181.

With this setup, I would expect to be able to start Remote Desktop and connect to 192.168.0.181. unfortunately it doesn't work and after about 10 seconds Remote Desktop tells me it can't connect to 192.168.0.181.

Any hit of why this wouldn't work?

avernet

Posted 2009-11-19T02:26:34.063

Reputation: 1 993

Answers

5

Don't connect to the IP assigned to Windows running inside VirtualBox, but to the host, or simply localhost if connecting from the same machine. This way it works like a charm.

avernet

Posted 2009-11-19T02:26:34.063

Reputation: 1 993

2

Does this work in case of Bridge network? I tried localhost and 127.0.0.1, but no luck. But connecting to 127.0.0.2 worked fine (as noted in this official article).

– Jet – 2014-07-12T08:55:06.517

6

I was having the exact same problem until I installed the Extension Pack. Turns out the VRDP extension isn't installed by default even though the docs make it sound like it is.

Reading the log file for the VM showed

00:00:00.230 VRDE: VirtualBox Remote Desktop Extension is not available.

James Moore

Posted 2009-11-19T02:26:34.063

Reputation: 161

2

Check if windows has firewall enabled, disable it will allow remote connection. With bridged network setting, you have to connect to the IP of guest, not the host.

ray chakrit

Posted 2009-11-19T02:26:34.063

Reputation: 21

Yes, this did the trick for me. The dialog seeking credentials instantly came up. Thanks! – Chethan S. – 2015-09-08T11:18:33.497

2

As far as I know, I just re-tested it. Remember also that the account you will connect to must have a password.

You have to enable it also inside Windows 7 as follow (from W7 help) :

How do I allow remote connections on the computer I want to connect to?

If the computer you want to connect to is using Windows 7 Professional, 
Windows 7 Ultimate, or Windows 7 Enterprise, follow these steps:

Click to open System. 

In the left pane, click Remote settings.  If you are prompted for an administrator 
password or confirmation, type the password or provide confirmation. 

In the System Properties dialog box, under Remote Desktop, select one of the 
three options, and then click Select Users. 

If you are an administrator on the computer, your current user account will 
automatically be added to the list of remote users and you can skip the next two steps.

In the Remote Desktop Users dialog box, click Add.

In the Select Users or Groups dialog box, do the following:

To specify the search location, click Locations, and then select the 
location you want to search.

In Enter the object names to select, type the name of the user that you 
want to add, and then click OK. 

The name will be displayed in the list of users in the Remote Desktop 
Users dialog box.

fgranger

Posted 2009-11-19T02:26:34.063

Reputation: 129

Thanks, it worked. After doing it on guest OS (added user "Everyone" to that list), I just started Remote Desktop Client on host OS, wrote there "127.0.0.2:3389" (not 127.0.0.1, as stated in VB site), and it worked! (My adapter is Bridge adapter too, ext-pack installed.) – Jet – 2014-07-12T08:46:47.003

@avernet When I changed port in VM settings to 5050, I could connect to it using "127.0.0.2:5050". So, probably Virtualbox handles connection. – Jet – 2014-07-12T08:48:38.413

Yes, this is one way to do it: let Windows handle the Remote Desktop connections. But with VirtualBox, VirtualBox itself handles the Remote Desktop connections, and this is why you should connect to the IP of the host, not the one of Windows (see my response on this). – avernet – 2009-11-20T00:43:00.307

Windows still needs to be configured to accept RDP connections, regardless of where the connection is handled. – Joe Internet – 2009-11-20T05:51:07.280