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 ·
DSPatrick avatar image
0 Votes"
DSPatrick answered SeHor-8331 commented

If you want to access them from another pc then the vSwitch type should be external.
https://blogs.technet.microsoft.com/jhoward/2008/06/17/hyper-v-what-are-the-uses-for-different-types-of-virtual-networks/

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





· 1
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.

I only need to access the VMs from my laptop where the VMs are build not from any other pc. thank you,

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

Sounds good, I'd check that that port you're using (default 3389) has been allowed via windows firewall. Also try by ip address in the case of problematic name resolution.

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





· 1
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.

yes, I did enable the 3389 in advanced Firewall, as i mentioned in the original post, also i am testing for IP in the RDP, but getting "Remote Desktop can't connect to the remote computer for one of these reasons"... message.

Thank you for trying to help me, any other ideas that I can try?

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

Please post the results from both laptop and virtual machine. (use address of VM in both cases)

Test-NetConnection -ComputerName "192.168.49.142" -CommonTCPPort "RDP" -InformationLevel "Detailed"





· 2
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.

<# on laptop #>

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

0 Votes 0 ·

<# running on VM client #>

Test-NetConnection -ComputerName "192.168.5.41" -CommonTCPPort "RDP" -InformationLevel "Detailed"

ComputerName : 192.168.5.41
RemoteAddress : 192.168.5.41
RemotePort : 3389
AllNameResolutionResults :
MatchingIPsecRules :
NetworkIsolationContext : Internet
InterfaceAlias : Ethernet 3
SourceAddress : 192.168.5.41
NetRoute (NextHop) : 0.0.0.0
PingSucceeded : True
PingReplyDetails (RTT) : 0 ms
TcpTestSucceeded : True

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

Thank you DSPatrick for looking into it. I ran above for both laptop and VM.

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

Looks like there is no route defined between the two networks 192.168.0.1 and 192.168.5.x An unedited ipconfig /all of both may be helpful.

--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

If you could please explain to me how to do it that should be great. thank you for your help...

Ethernet adapter Local Area Connection* 1:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Outside Network Adapter For Network client access
Physical Address. . . . . . . . . : 41-B1-16-92-EA-03
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IPv4 Address. . . . . . . . . . . : xxx.xxx.xx.xxx(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.224.0
Lease Obtained. . . . . . . . . . : June 9, 2021 5:05:46 PM
Lease Expires . . . . . . . . . . : July 17, 2157 12:20:53 AM
Default Gateway . . . . . . . . . :
DHCP Server . . . . . . . . . . . : xxx.xxx.xx.xxx
DNS Servers . . . . . . . . . . . : xxx.xxx.xx.xxx
xxx.xxx.xx.xxx
NetBIOS over Tcpip. . . . . . . . : Enabled

Ethernet adapter vEthernet (Internal):

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter #2
Physical Address. . . . . . . . . : 11-15-5D-11-A4-0D
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
IPv4 Address. . . . . . . . . . . : 192.168.5.1(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :
NetBIOS over Tcpip. . . . . . . . : Enabled

Ethernet adapter Ethernet:

Connection-specific DNS Suffix . : hitronhub.home
Description . . . . . . . . . . . : Intel(R) Ethernet Connection (7) I219-V
Physical Address. . . . . . . . . : 29-75-B3-FB-AC-0D
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IPv4 Address. . . . . . . . . . . : 192.168.0.85(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Lease Obtained. . . . . . . . . . : June 9, 2021 4:50:41 PM
Lease Expires . . . . . . . . . . : June 16, 2021 4:50:41 PM
Default Gateway . . . . . . . . . : 192.168.0.1
DHCP Server . . . . . . . . . . . : 192.168.0.1
DNS Servers . . . . . . . . . . . : 192.168.0.1
NetBIOS over Tcpip. . . . . . . . : Enabled


Ethernet adapter vEthernet (Default Switch):

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter
Physical Address. . . . . . . . . : BB-15-AB-77-64-91
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
IPv4 Address. . . . . . . . . . . : 172.17.202.161(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.240
Default Gateway . . . . . . . . . :
NetBIOS over Tcpip. . . . . . . . : Enabled

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

If you could please explain to me how to do it that should be great. thank you for your help...

Please run;

ipconfig /all > C:\laptop.txt
ipconfig /all > C:\virtualmachine.txt

then you can attach the two files to a reply or put unzipped text files up on OneDrive and share a link.

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 can probably define a static route.

ROUTE ADD 192.168.5.0 MASK 255.255.255.0 192.168.5.1
or do
ROUTE ADD /P 192.168.5.0 MASK 255.255.255.0 192.168.5.1
to make it persist

--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 SeHor-8331 edited

I also posted the results from VM, do you think the route mapping you proposed might work? Also is it possible to add routing on the VM only, not on laptop? as mentioned, I am a beginner on this.

Thanks again.

Host Name . . . . . . . . . . . . : DC1
Primary Dns Suffix . . . . . . . : SQLCLS.local
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
DNS Suffix Search List. . . . . . : SQLCLS.local

Ethernet adapter Ethernet 3:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Microsoft Hyper-V Network Adapter #3
Physical Address. . . . . . . . . : 22-15-AF-00-A4-0F
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::e08a:1cfd:deb1:6414%16(Preferred)
IPv4 Address. . . . . . . . . . . : 192.168.5.40(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.5.1
DHCPv6 IAID . . . . . . . . . . . : 369104221
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-28-3B-88-DA-00-15-5D-00-A4-07
DNS Servers . . . . . . . . . . . : ::1
127.0.0.1
NetBIOS over Tcpip. . . . . . . . : Enabled

Tunnel adapter isatap.{A2A40EFE-55E1-418F-B4DF-A76C01A5E4BA}:

Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Microsoft ISATAP Adapter
Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes

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

Should work for either 192.168.5.40 or 192.168.5.41

--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.