How to connect via RDP to my Hyper-V machine?
Solution 1:
I did try using A to RDP to my VM via it's PC name and that works without issue. So how would I connnect to the VM from B?
The Hyper-V Guest Machine in Machine A defaults to a NAT network, nominally 172.16.x.y. I verified this on my on Hyper-V Guest machine.
You need to change your Hyper-V Guest machine to "Bridged" Networking. Hyper-V calls it External. Same thing.
I am using a Kali Linux Guest machine. You need to set up for your Guest Machine.
Summary:
- Add an External Switch (Bridged Mode) to the Hyper-V Manager on Machine A.
- Change the network settings in the Guest to External and restart the Guest and make a note of the IP address.
- Add RDP Protocol (xrdp) to the Guest if necessary. Windows Guest does not need this - already there.
- Log out of the guest machine (but do not shut it down).
- From Machine B. open RDP, enter the IP of the Machine A guest, user name and connect.
It works.
1. Add an External Switch to Hyper-V
2. Change the Guest Settings to use the External Switch (Bridged Mode).
If your Guest Machine is Linux, be sure to set up xrdp
Set up xrdp on Linux
sudo apt install xrdp
sudo systemctl enable xrdp
3. On Machine B, connect by RDP. Be sure to log out of the Guest machine A. RDP will log out of a Windows Guest but does not know what to do with a Linux guest.
4. It all works. I am working on Machine B. Here is a screen shot of Kali on Machine A
I have carefully laid out all the steps so you can change Hyper-V as needed and so you can see that it all works assuming you use an External Switch (Bridged Mode). NAT will not allow you to connect.