Thursday 21 July 2011

How to Rdp to a Hyper-V VM (Locally hosted)

The problem:

Although you can access your vm directly from a hyper-v vm viewer by double click on the vm, the window size is pretty limited and doesn't allow easy copy and paste.

The solution:

Setup a rdp connection is the way to go.

The implementation overview:

* Ping the vm
* Enable remote access in vm
* Include vm users in remote access. Otherwise you won't be able to use the account to remote access the vm.

The implementation:

* Enable the Network Adapter for your Hyper-V vm properties. Network Adapter = Network card

* Ping the vm from the hosting machine (Not compulsory but it is good way to know if the network has been set up)
+ Allow ping request in the vm
- (In Windows 7) Control Panel --> System and security --> Windows Firewall --> Advanced settings --> Inbound rules --> New rule --> custom rule
- in Protocol and ports: Protocol: ICMPv4
on the same panel go to customize, choose "Specific ICMP types", check the box "echo request"
- The rest is trivial; go to next... next... and save it.

* Enable remote access in vm
+ http://www.howtogeek.com/howto/windows-vista/turn-on-remote-desktop-in-windows-vista/

* Include vm users in remote access
1. Open the Remote tab in the System Properties window (see instructions above).
2. Click the Select Users button in the Remote tab of the System Properties window.
3. Click Add in the Remote Desktop Users window.
4. Click the Advanced button in the Select Users window.
5. Click the Find Now button.
6. Select the user you want to add to the list of users able to log in with Remote Desktop and then click OK.
7. Click OK in the Select Users window.
Note: Make sure the user you’ve just added is in the object names box.
8. Click OK in the Remote Desktop Users window.
9. Click OK in the System Properties window.

1 comment:

  1. Not sure if it matters but the settings for my network adapter don't look the same as yours. Where yours says "Network:" mine says Virtual Switch. I don't know how to ping my vm because I don't know it's IP address, so I don't know how to attempt to RDP to it either. Not sure if you'll see this, but any advice?

    ReplyDelete