question

DelaneyHorton-3147 avatar image
0 Votes"
DelaneyHorton-3147 asked DSPatrick commented

Hyper-V Internet access on one VM but not the other

I have two VMs residing on my Hyper-V host. One is a Windows 10 and the other is a Windows Server 2016 instance.
I have one external switch created and it is attached to both of the virtual machines.
The Windows 10 VM is able to access the Internet, but the Windows Server 2016 VM cannot.
I have tried removing the switch from the VM and adding it back, but it doesn't make a difference.
How could this be the case when they are both using the same external virtual switch?

windows-server-hyper-v
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.

yagmoth555 avatar image
0 Votes"
yagmoth555 answered

Hi

Please compare the IP configuration and try to check if the server is static versus an DHCP lease maybe from the Windows 10.

nb; If the server is static, try it on DHCP to see if it can get a lease

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 DelaneyHorton-3147 commented

Please post the results below from both
tracert 8.8.8.8
ipconfig /all







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

Just checking if there's any progress or updates?

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



0 Votes 0 ·

To answer your questions:

tracert 8.8.8.8 on the Windows Server 2016 VM with no Internet:

 Tracing route to 8.8.8.8 over a maximum of 30 hops

   1  Transmit error: code 1231.

 Trace complete.



0 Votes 0 ·

ipconfig/all on 2016VM:

 Windows IP Configuration
    Host Name . . . . . . . . . . . . : WIN-8SN402582I5
    Primary Dns Suffix  . . . . . . . :
    Node Type . . . . . . . . . . . . : Hybrid
    IP Routing Enabled. . . . . . . . : No
    WINS Proxy Enabled. . . . . . . . : No
    
 Ethernet adapter Ethernet 2:
    Connection-specific DNS Suffix   :
    Description . . . . . . . . . . . : Microsoft Hyper-V Network Adapter #2
    Physical Address. . . . . . . . . : 00-15-5D-2C-17-08
    DHCP Enabled. . . . . . . . . . . : Yes
    Autoconfiguration Enabled . . . . : Yes
    Link-local IPv6 Address . . . . . : fe80::f812:9195:5f17:7459%11(Preferred)
    Autoconfiguration IPv4 Address. . : 169.254.116.89(Preferred)
    Subnet Mask . . . . . . . . . . . : 255.255.0.0
    Default Gateway . . . . . . . . . :
    DHCPv6 IAID . . . . . . . . . . . : 83891549
    DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-29-72-43-53-00-15-5D-2C-17-03
    DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1
                                        fec0:0:0:ffff::2%1
                                        fec0:0:0:ffff::3%1
    NetBIOS over Tcpip. . . . . . . . : Enabled
    
 Tunnel adapter isatap.{DB50BD3F-72EB-4E42-A388-1AE6999E6815}:
    Media State . . . . . . . . . . . : Media disconnected
    Description . . . . . . . . . . . : Microsoft ISATAP Adapter
    Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
    DHCP Enabled. . . . . . . . . . . : No
    Autoconfiguration Enabled . . . . : Yes


0 Votes 0 ·
DelaneyHorton-3147 avatar image
0 Votes"
DelaneyHorton-3147 answered DelaneyHorton-3147 commented

Something new that I've just noticed today: the Windows 10 VM is now not connecting to the Internet either, though I know for a fact that it has been connected for several days leading up to now.

Here is the tracert output on the Windows 10 VM today:

 Tracing route to 8.8.8.8 over a maximum of 30 hops
    
   1     *        *        *     Request timed out.
   2     *        *        *     Request timed out.
   3     *        *        *     Request timed out.
   4     *        *        *     Request timed out.
   5     *        *        *     Request timed out.
   6     *        *        *     Request timed out.
   7     *        *        *     Request timed out.
   8     *        *        *     Request timed out.
· 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.

Here is the ipconfig /all output from the Windows 10 VM:

 Windows IP Configuration
    
    Host Name . . . . . . . . . . . . : DESKTOP-BARGUKO
    Primary Dns Suffix  . . . . . . . :
    Node Type . . . . . . . . . . . . : Mixed
    IP Routing Enabled. . . . . . . . : No
    WINS Proxy Enabled. . . . . . . . : No
    DNS Suffix Search List. . . . . . : mshome.net
    
 Ethernet adapter Ethernet 3:
    
    Connection-specific DNS Suffix  . : mshome.net
    Description . . . . . . . . . . . : Microsoft Hyper-V Network Adapter #3
    Physical Address. . . . . . . . . : 00-15-5D-2C-17-05
    DHCP Enabled. . . . . . . . . . . : Yes
    Autoconfiguration Enabled . . . . : Yes
    Link-local IPv6 Address . . . . . : fe80::f067:964b:106a:8a9a%15(Preferred)
    IPv4 Address. . . . . . . . . . . : 192.168.137.122(Preferred)
    Subnet Mask . . . . . . . . . . . : 255.255.255.0
    Lease Obtained. . . . . . . . . . : Tuesday, January 25, 2022 12:58:52 PM
    Lease Expires . . . . . . . . . . : Monday, January 31, 2022 12:40:06 PM
    Default Gateway . . . . . . . . . : 192.168.137.1
    DHCP Server . . . . . . . . . . . : 192.168.137.1
    DHCPv6 IAID . . . . . . . . . . . : 268440925
    DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-29-72-59-73-00-15-5D-2C-17-01
    DNS Servers . . . . . . . . . . . : 192.168.137.1
    NetBIOS over Tcpip. . . . . . . . : Enabled
0 Votes 0 ·
DSPatrick avatar image
0 Votes"
DSPatrick answered DelaneyHorton-3147 commented

both using the same external virtual switch?

This looks more like both using a default switch on windows 10. Might try creating an external vSwitch and connecting guests to it.
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--










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

They are not using a default switch, they are both using an external switch that I've already created. I created the Windows Server 2016 VM yesterday, and noticed that I did not have Internet in that VM, though I was able to access the internet from the Windows 10 VM. Again, the Windows 10 VM has been connected to the Internet for several days up until this morning.
Here is a screenshot showing that I only have one external virtual switch for use:
168396-vdi-external-switch.png


0 Votes 0 ·

Note also that yesterday, I removed the network adapter from the Windows Server 2016 VM and reattached it: no difference.
I then deleted the external virtual switch I had yesterday and recreated it: the Windows 10 VM remained connected to the Internet (again, until today), and the Windows Server 2016 VM could still not connect.

0 Votes 0 ·
DSPatrick avatar image
0 Votes"
DSPatrick answered DelaneyHorton-3147 commented

Sorry, only looked at the second one which uses the same address space as the default switch (192.168.137.xxx) which is likely problematic. The first one got an APIPA address (169.254.xxx.xxx) which simply means there was no DHCP server available on the connected network.

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



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

Okay, would you mind elaborating a little bit on how I can fix this?
I can tell that the 169.254.xxx.xxx address is APIPA which means it's not receiving DHCP IP; I wasn't aware that the 192.168.137.xxx address space belonged to the default switch.
We had a set up with two hosts before, each using an external virtual switch for VM connectivity that worked without any problems right out of the box. We recently upgraded our machines and tried to redeploy our hosts from scratch... we set up the external virtual switch the same exact way that we had it configured on the last deployment, but we've run into these issues now.
Seeing as networking just kind of "worked" last time, I'm not understanding why there are issues occurring now, and I certainly don't know how to fix these things.
We do have a DHCP server on the same network as the Hyper-V hosts, but again, I never had to do any explicit configuration for networking like this.

0 Votes 0 ·
DSPatrick avatar image DSPatrick DelaneyHorton-3147 ·

We do have a DHCP server on the same network as the Hyper-V hosts

Then I'd probably compare an ipconfig /all of some other physical working pc to the results above.


0 Votes 0 ·

I have attached the output of ipconfig /all from the Hyper-V host that is running the VMs in question.168522-ipconfigall.txt


0 Votes 0 ·
ipconfigall.txt (4.9 KiB)
DSPatrick avatar image
0 Votes"
DSPatrick answered DelaneyHorton-3147 commented

I think the external vSwitch is tied to the wrong network interface. If the host has internet access then it's got to be via QLogic BCM5709C Gigabit Ethernet (NDIS VBD Client) #35 (Ethernet adapter Ethernet 5 10.195.44.1 network) since that's the only interface with a default gateway address.

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





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

Just checking if there's any progress or updates?

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



0 Votes 0 ·

I believe that I have the external vSwitch connected to the Ethernet 5 adapter?
The Hyper-V Switch manager doesn't show #35, #36, etc for the adapters so it's difficult to tell for sure, but I have included relevant screenshots so you can see for yourself.
As I mentioned, this is a redeployment on the same physical hosts after running an OS upgrade and rebuilding from scratch. We have set up the external switch in the exact same way, on the exact same physical adapter, but it doesn't work this time.
168679-vdihost01adapters.png168680-eth5shareprops.png168811-adapteroptionshypers.png


0 Votes 0 ·
DSPatrick avatar image
0 Votes"
DSPatrick answered DelaneyHorton-3147 commented

Ok, well then it looks like the addressing may be incorrect for that guest. From what I can tell the default gateway is 10.195.44.1

--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 do see that this is an issue.
How do you suggest that I go about fixing this?
As I said, we do have a DHCP server on the host network. How can I configure the VMs to automatically be assigned IP addresses from this somehow?
I also still don't understand why IP information isn't being assigned correctly now when it used to work just fine before. I wish I had IP info from before to compare it to.

0 Votes 0 ·
DSPatrick avatar image
0 Votes"
DSPatrick answered DelaneyHorton-3147 commented

How do you suggest that I go about fixing this?

Delete / recreate the external vSwitch, just make sure it's on the correct network ( presumably 10.195.44.1)

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







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

Just checking if there's any progress or updates?

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



0 Votes 0 ·

As you've seen, in the Change Adapter Settings on the Hyper-V Host, my adapters are named QLogic BCM5709C Gigabit Ethernet (NDIS VBD Client) #35, #36, etc. but in the Hyper-V Switch Manager they are named QLogic BCM5709C Gigabit Ethernet (NDIS VBD Client), #2, #3, etc.
Since it's hard to tell if I'm actually picking the right one through the Switch Manager, I created one using PowerShell since I know Ethernet 5 is what we want the switch connected to:

 PS C:\Windows\system32> New-VMSwitch -Name "VDI_External_Switch" -NetAdapterName "Ethernet 5" -AllowManagementOS 1 -Notes "VDI External vSwitch created by Powershell" -EnableIOV:$true
    
 Name                SwitchType NetAdapterInterfaceDescription
 ----                ---------- ------------------------------
 VDI_External_Switch External   QLogic BCM5709C Gigabit Ethernet (NDIS VBD Client) #3

You can see that Ethernet 5 is actually tied to #3 in Hyper-V Switch Manager, and not the first unnumbered one like I had configured before.
Running ipconfig /all on the host shows that the vSwitch now has the correct network address:
169057-ipconfigallvdihost01.txt

However, the Windows 10 VM does not have connectivity to the Internet when attached to the new vSwitch. Here is the ipconfig /all on the VM showing APIPA configuration still:
169183-ipconfigallwin10vm.txt


0 Votes 0 ·
DSPatrick avatar image
0 Votes"
DSPatrick answered DSPatrick commented

This shouldn't be that difficult. The simplest solution may be to remove both vSwitches, then add back a single vSwitch, trying each adapter until you get it.

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

Just checking if there's any progress or updates?

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



0 Votes 0 ·
DelaneyHorton-3147 avatar image
0 Votes"
DelaneyHorton-3147 answered DSPatrick commented

@DSPatrick I figured out why the VMs were not receiving the proper IP information when the virtual switch was attached the proper network adapter.
I went to the location that the hosts were physically being kept, and discovered that the host being used for AD/DHCP/Storage services was down due to a failed disk. After replacing the disk, reconfiguring RAID and restoring from a recovery point, the OS is back up and functional.
After rebooting the Hyper-V host, the virtual machines were able to receive the properly IP config to access the internet via the external virtual switch.

This was not a Hyper-V issue it turns out, but an issue of not being able to contact the DHCP server due to disk failure.
Thank you for your time and patience while troubleshooting this.

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

Glad to hear, you're welcome.

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



0 Votes 0 ·

Just checking if there's any progress or updates?

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



0 Votes 0 ·