Virtualbox - Remote desktop from Windows 7 to VirtualBox (with Windows Server 2008)?

2

1

I have installed VirtualBox on Windows 7, and created a new VM with Windows Server 2008. This seems to be working OK.

I'm now interested in remote desktop from my Windows 7 to the VM, but can't get that to work. I tried to use 127.0.0.2:3389, as mentioned in the VirtualBox documentation.

When I try to connect, it seems like the address is found, but can connect with the standard Administrator account. I am thinking there are some network configurations here that I'm missing.

Rupal

Posted 2011-10-12T12:46:06.130

Reputation: 121

Not really a programming question – IanNorton – 2011-10-12T12:50:26.337

You're right, I'm moving it. – None – 2011-10-12T12:57:33.083

Answers

4

To expand on @billc.cn's third point, for Server 2012 I was able to use remote desktop by

  1. Enabling Remote desktop on the guest 2012 VM
  2. Leaving "Enable Server" unchecked on the VM Settings->Display dialog
  3. Using the NAT option on the VirtualBox Network Dialog
  4. On the same screen, click Port forwarding
  5. Enter an arbitary value for Name
  6. Protocol: TCP
  7. Host and Guest IP: blank
  8. Host port: 9090 (arbitrary but unused on my system)
  9. Guest port: 3389 (Remote desktop)

Now I can open the Windows Remote Desktop client, and using the Options button, connect to localhost:9090, supplying the necessary credentials.

And in case you're were not aware you can also start the VM "headless" by shift+clicking the Start button in VirtualBox when you launch your VM.

perlyking

Posted 2011-10-12T12:46:06.130

Reputation: 201

Good info. As a note - it's easy to 'enable' RDP on the server via server manager or 'sconfig', but you should be aware that the Windows firewall (by default) will continue to block port 3389. If you have NO NEED for windows firewall on the VM guest server, you can turn it off via command line like this: netsh advfirewall set AllProfiles state offor conversely you can add the port yourself. – bshea – 2017-01-06T21:48:51.047

1

The problem is, by default, your guest operating system shares the IP of the host through NAT which means you cannot access any ports on the guest directly.

You need to do one of these:

  • Change the virtual NIC to use bridged connection and configure the IP address of the guest (if no DHCP)
  • Use host only network and configure the IP address of the guest
  • Set-up port forwarding for the NAT network

The details can be found at http://www.virtualbox.org/manual/ch06.html

billc.cn

Posted 2011-10-12T12:46:06.130

Reputation: 6 821