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-01: Use VirtualBox RDP featureSetup Correct Network Adapter:
- Enable 'Remote Display Server' in VM Manager
- Go to VirtualBox Manager
- Select the VM where RDP is needed
- Click 'Settings'
- From left navigation panel, click 'Display'
- From right pane, select 'Remote Display' tab
- Check 'Enable Server'
- Provide a port number in 'Server Port:' (remember this port which will be needed to setup Firewall later)
- Click 'OK'
- Enable RDP in host:
- 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'
- 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)
- Create a Firewall rule in host:
- Click 'Start' - 'Administrator Tools' - Windows Firewall with Advanced Security'
- Click 'Inbound Rules' from left navigation panel
- Click 'New Rule...'
- Select 'Port' - hit 'Next'
- Select 'TCP', specify port number which is given in Step-01.07 - hit 'Next'
- Select 'Allow the connection' - hit 'Next'
- Select 'Domain', 'Private', 'Public' based on need - hit 'Next'
- Provide a unique name for the rule - hit 'Finish'
- Install VirtualBox Guest Additions
Option-02: Use guest VM's RDP directly:
- Enable Remote Desktop in guest:
- 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'
- 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)
- Setup Correct Network Adapter:
- Go to VirtualBox Manager
- Select the VM where RDP is needed
- Click 'Settings'
- From left navigation panel, click 'Network'
- 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
- Select 'Bridged Adapter' under 'Attached to:' dropdown
- Select the appropriate network from 'Name:'. If host machine has multiple network adapters (Wireless, NIC card etc.), all will be displayed here.
- Need to make sure 'Cable Connected' checkbox is checked
- 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.