question

SeHor-8331 avatar image
0 Votes"
SeHor-8331 asked jiayaozhu-MSFT commented

RDP to Hyper-V machine with internal network only not working!

On my laptop, I created 2 Hyper-V VMs: an AD controller and a SQL Server. I need to be able to RDP to these 2.
With Virtual Switch Manager I created an internal network to which I attributed 192.168.5.1 (subnet mask 255.255.255.0) on my laptop. For the AD VM I assigned 192.168.5.40 (subnet mask 255.255.255.0) , default gateway 192.168.5.1, preferred DNS 127.0.0.1

Also on the VM under remote Settings : I allowed remote connections ( I tested with or without NLA). Also on the VM, I allowed RDP port 3389 in Advanced Firewall.

But I am not able to RDP to the AD controller VM or ping it, in RDP I get "Remote Desktop can't connect to the remote computer for one of these reasons"...

Can you please let me know :
-is it possible to RDP to VMs if only have an internal network (no external or default on it)?
- if yes, any missing steps?

I am not really experienced on this and would really appreciate your help.

Thank you,

windows-10-hyperv
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi,

I would like to check if you have tried the way that @DSPatrick gave you, and if the reply could be of help? If yes, please help accept answer, so that others meet a similar issue can find useful information quickly. If you have any other concerns or questions, please feel free to feedback.

Best Regards,
Joan

0 Votes 0 ·

Hi,

I would like to check if the reply could be of help? If yes, please help accept answer, so that others meet a similar issue can find useful information quickly. If you have any other concerns or questions, please feel free to feedback.

Best Regards,
Joan

0 Votes 0 ·

Hi,

We haven't heard from you for a long time and I would like to check if the reply could be of help? If yes, please help accept answer, so that others meet a similar issue can find useful information quickly. If you have any other concerns or questions, please feel free to feedback. Your support is really important to our work.

Best Regards,
Joan

0 Votes 0 ·
SeHor-8331 avatar image
0 Votes"
SeHor-8331 answered

Sorry, do not understand. You said “Looks like there is no route defined between the two networks 192.168.0.1 and 192.168.5.x” . where the 192.168.5.1 is the Hyper-V internal IP on the laptop
And then you added :
ROUTE ADD 192.168.5.0 MASK 255.255.255.0 192.168.5.1
But I think you meant
ROUTE ADD 192.168.5.0 MASK 255.255.255.0 192.168.0.1 -right? And do I add the route on the laptop? I would rather avoid adding route on the laptop if possible, can I add only on VM? I would just like to use the internal network not the external or the default switch. I understand that my knowledge is limited on this, if you can please help. Thank you !!

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

DSPatrick avatar image
0 Votes"
DSPatrick answered DSPatrick edited

Should be
ROUTE ADD 192.168.5.0 MASK 255.255.255.0 192.168.5.1
to direct the 192.168.5.x traffic to go out the 192.168.5.1 interface. Yes, the route needs defined on the host (laptop)

To remove it you can do
route delete 192.168.5.0 MASK 255.255.255.0

--please don't forget to upvote and Accept as answer if the reply is helpful--





5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

SeHor-8331 avatar image
0 Votes"
SeHor-8331 answered

Thank you, on laptop (host) i did
ROUTE ADD 192.168.5.0 MASK 255.255.255.0 192.168.5.1
got this.
The route addition failed: The object already exists.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

DSPatrick avatar image
0 Votes"
DSPatrick answered

Strange, you could try
route print

to see if it's there.


--please don't forget to upvote and Accept as answer if the reply is helpful--


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

SeHor-8331 avatar image
0 Votes"
SeHor-8331 answered

the line that was already there is

Network destination Netmask Gateway Interface Metric

.............................................................................
192.168.5.0 255.255.255.0 On-link 192.168.5.1 271
.......................................................................

Thank you,

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

DSPatrick avatar image
0 Votes"
DSPatrick answered DSPatrick edited

Two things
the metric is pretty high
if you look directly below the route print output in the Interface List on the very left is the the interface ID which the route statement may not be using or has them mixed up. You could try route delete and then add it back in but also specifying the interface (example below for interface 6) Some info here if you wanted to read up.
https://devopspoints.com/windows-server-2019-building-a-routing-table.html

ROUTE ADD 192.168.5.0 MASK 255.255.255.0 192.168.5.1 IF6

or if you didn't want to do any of this you could connect the VM to the external vSwitch and be done with it.




--please don't forget to upvote and Accept as answer if the reply is helpful--


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

SeHor-8331 avatar image
0 Votes"
SeHor-8331 answered

I deleted and readded (picked up the interface id corresponding to the Internal Hyper-V network

Now gives me much less response time, but still cannot connect.

Network destination Netmask Gateway Interface Metric

.............................................................................
192.168.5.0 255.255.255.0 On-link 192.168.5.1 16
.......................................................................

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

DSPatrick avatar image
0 Votes"
DSPatrick answered

You could try again with
Test-NetConnection -ComputerName "192.168.5.41" -CommonTCPPort "RDP" -InformationLevel "Detailed"

to see what interface it tries to use.

-please don't forget to upvote and Accept as answer if the reply is helpful--




5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

SeHor-8331 avatar image
0 Votes"
SeHor-8331 answered

unfortunately exactly the same as before...

Test-NetConnection -ComputerName "192.168.5.41" -CommonTCPPort "RDP" -InformationLevel "Detailed"
WARNING: TCP connect to (192.168.5.41 : 3389) failed
WARNING: Ping to 192.168.5.41 failed with status: TimedOut


ComputerName : 192.168.5.41
RemoteAddress : 192.168.5.41
RemotePort : 3389
NameResolutionResults : 192.168.5.41
MatchingIPsecRules :
NetworkIsolationContext : Internet
IsAdmin : False
InterfaceAlias : Ethernet
SourceAddress : 192.168.0.85
NetRoute (NextHop) : 192.168.0.1
PingSucceeded : False
PingReplyDetails (RTT) : 0 ms
TcpTestSucceeded : False

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

DSPatrick avatar image
1 Vote"
DSPatrick answered

Might work through this one.
https://social.technet.microsoft.com/Forums/en-US/22df644e-de97-40b3-8356-4d92fbabed52/rdp-from-my-machine-into-vms?forum=winserverhyperv

--please don't forget to upvote and Accept as answer if the reply is helpful--


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.