Wednesday, July 11, 2012

VirtualBox - Setup - RDP to windows VM

There are two options to setup Remote Desktop in Guest VM using Oracle VirtualBox. Once the RDP is setup, windows RDP client can be used to connect to the VM.

1. Option-01: Use VirtualBox RDP feature
2. Option-02: Use guest VM's RDP directly

Environment Information:
1. Operating System: Windows 2008 R2
2. Oracle VirtualBox: 4.1.16

Option-01Use VirtualBox RDP featureSetup Correct Network Adapter:

  1. Enable 'Remote Display Server' in VM Manager
    1. Go to VirtualBox Manager
    2. Select the VM where RDP is needed
    3. Click 'Settings'
    4. From left navigation panel, click 'Display'
    5. From right pane, select 'Remote Display' tab
    6. Check 'Enable Server'
    7. Provide a port number in 'Server Port:' (remember this port which will be needed to setup Firewall later)
    8. Click 'OK'
  2. Enable RDP in host:
    1. Click 'Start', point to 'Control Panel', click 'System and Security', click 'System' and then click 'Remote Settings' or
      Click 'Start', right-click 'My Computer', click 'Properties' and then click 'Remote Settings'
    2. On 'Remote' tab, under 'Remote Desktop' section, select 'Allow connections from computers', second option. (Based on need, third option can be selected; Allow connections only from computers running Remote Desktop with network level authentication)
  3. Create a Firewall rule in host:
    1. Click 'Start' - 'Administrator Tools' - Windows Firewall with Advanced Security'
    2. Click 'Inbound Rules' from left navigation panel
    3. Click 'New Rule...'
    4. Select 'Port' - hit 'Next'
    5. Select 'TCP', specify port number which is given in Step-01.07 - hit 'Next'
    6. Select 'Allow the connection' - hit 'Next'
    7. Select 'Domain', 'Private', 'Public' based on need - hit 'Next'
    8. Provide a unique name for the rule - hit 'Finish'
  4. Install VirtualBox Guest Additions
Option-02Use guest VM's RDP directly:
  1. Enable Remote Desktop in guest:
    1. Click 'Start', point to 'Control Panel', click 'System and Security', click 'System' and then click 'Remote Settings' or
      Click 'Start', right-click 'My Computer', click 'Properties' and then click 'Remote Settings'
    2. On 'Remote' tab, under 'Remote Desktop' section, select 'Allow connections from computers', second option. (Based on need, third option can be selected; Allow connections only from computers running Remote Desktop with network level authentication)
  2. Setup Correct Network Adapter:
    1. Go to VirtualBox Manager
    2. Select the VM where RDP is needed
    3. Click 'Settings'
    4. From left navigation panel, click 'Network'
    5. Go to appropriate adapter tab. Most of the times, a VM has only one adapter, in that case 'Adapter 1' tab has to be selected
    6. Select 'Bridged Adapter' under 'Attached to:' dropdown
    7. Select the appropriate network from 'Name:'. If host machine has multiple network adapters (Wireless, NIC card etc.), all will be displayed here.
    8. Need to make sure 'Cable Connected' checkbox is checked
    9. Press 'OK'
Note:
1. Collect host OS's IP address and the port number against that RDP/firewall is setup to connect from RDP client when using Option-01.
2. Collect guest OS's IP address to connect from RDP client when using Option-02.

1 comment:

Earl said...

Haven't used this system before (prefer VMware). Nedd to test it later :)