Windows Server 2019 Preview Build 17623 Hyper-V guest virtual machine network issue

%3CLINGO-SUB%20id%3D%22lingo-sub-177343%22%20slang%3D%22en-US%22%3EWindows%20Server%202019%20Preview%20Build%2017623%20Hyper-V%20guest%20virtual%20machine%20network%20issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-177343%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20have%20installed%20Windows%20Server%20Core%20and%20then%20enabled%20the%20Hyper-V%20Role%3B%20I%20have%20created%20an%20external%20virtual%20switch%20with%20%22Allow%20management%20operating%20system%20to%20share%20this%20network%20adapter%22%20checked%2C%20on%20the%20external%20network%20with%20the%20nic%20where%20I%20have%20the%20management%20ip%2C%20i.e.%20192.168.0.40%3B%26nbsp%3B%20I%20then%20created%20a%20guest%20virtual%20machine%20with%20Windows%2010%20and%20after%20installation%20I%20supposed%20it%20takes%20the%20network%20ip%20from%20dhcp%2C%20but%20it%20did%20not%20happen%3B%20so%20I%20tried%20to%20assign%20a%20static%20ip%20address%2C%20192.168.0.41%2C%20but%20tried%20to%20do%20a%20ping%20vs%20the%20host%20but%20I%20receive%20an%20%22host%20unreachable%22%2C%20so%20with%20all%20the%20addresses%20on%20the%20192.168.0.x%2F24%20network.%3C%2FP%3E%0A%3CP%3EWhere%20is%20my%20mistake%3F%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EMarco%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-177343%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EHyper-V%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ENetworking%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-201560%22%20slang%3D%22en-US%22%3ERe%3A%20Windows%20Server%202019%20Preview%20Build%2017623%20Hyper-V%20guest%20virtual%20machine%20network%20issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-201560%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Marco%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20Hyper-V%20Host%20virtual%20NIC%20should%20not%20prevent%20a%20virtual%20machine%20from%20communicating%20through%20an%20external%20switch.%26nbsp%3B%20The%20Hyper-V%20vSwitch%20operates%20at%20layer%202%2C%20and%20as%20such%2C%20anyone%20on%20that%20broadcast%20domain%20should%20be%20able%20to%20pass%20traffic%20to%20the%20VM.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFor%20example%3A%3C%2FP%3E%0A%3CP%3EHost1%20has%20the%20IP%20address%20of%2010.10.10.1%2F24%3C%2FP%3E%0A%3CP%3EHost2%20has%20a%20vNIC%20named%20%22vEthernet%20(vSwitchName)%22%20has%20an%20IP%20of%20169.254.x.x%3C%2FP%3E%0A%3CP%3EVM%201%20on%20host%202%20has%20an%20IP%20of%2010.10.10.2%2F24%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20the%20Windows%20Firewall%20on%20VM2%20allows%20ICMP-inbound%20(File%20and%20Print%20Sharing%20Group)%2C%20then%20ping%20should%20work.%20Also%2C%20a%20Hyper-V%20VM%20should%20be%20able%20to%20receive%20DHCP%20from%20an%20external%20DHCP%20server%20so%20long%20as%20that%20DHCP%20server%20is%20broadcasting%20on%20the%20same%20L2%26nbsp%3Bsubnet.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-178135%22%20slang%3D%22en-US%22%3ERe%3A%20Windows%20Server%202019%20Preview%20Build%2017623%20Hyper-V%20guest%20virtual%20machine%20network%20issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-178135%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20resolved%20the%20issue%2C%20but%20I%20don't%20no%20if%20it%20was%20initially%20my%20mistake%20or%20this%20is%20a%20but.%20I%20explain%3A%20in%20short%2C%20when%20I%20created%20with%20Hyper-V%20Manager%20from%20my%20Windows%2010%20machine%20the%20virtual%20switch%20the%20system%20doesn't%20bound%20the%20virtual%20ethernet%20created%20with%20the%20physical%20network%20adapter%2C%20so%20the%20virtual%20ethernet%20had%20an%20address%20like%20169.256.xxx.xxx%20and%20it%20was%20impossible%20form%20the%20guest%20to%20communicate%20with%20an%20external%20network.%3C%2FP%3E%0A%3CP%3EFirst%2C%20I%20tried%20to%20give%20an%20address%20of%20my%20network%20to%20the%20virtual%20adapter%2C%20but%20it%20not%20worked%3B%20after%20this%20I%20used%20the%20following%20powershell%20command%20to%20bound%20the%20physical%20and%20virtual%20network%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3ESet-VMSwitch%20-Name%20%22External%22%20-NetAdapterNme%20%22Ethernet%202%22%3C%2FPRE%3E%0A%3CP%3Ewhere%20%22External%22%20was%20the%20vswitch%20name%20while%20the%20%22Ethernet%202%22%20was%20the%20physical%3B%20to%20obtain%20the%20name%20of%20the%20latter%20I%20simply%20used%20the%20powershell%20command%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3EGet-NetAdapter%3C%2FPRE%3E%0A%3CP%3ENow%20I%20have%202%20tests%20to%20do%20to%20understand%20better%20if%20this%20is%20an%20issue%3A%20try%20to%20use%20powershell%20to%20create%20the%20external%20vswitch%2C%20using%20the%20cmdlet%20New-VMSwitch%20(%22set%22%20cmdlet%20worked%2C%20I%20don't%20know%20if%20%22new%22%20is%20working%2C%20seen%20the%20behavior%20of%20the%20user%20interface%20to%20create%20the%20external%20vswitch).%3C%2FP%3E%0A%3CP%3EThe%20second%20test%20is%20to%20not%20assign%20an%20ip%20to%20the%20external%20vswitch%2C%20but%20let%20the%20user%20interface%20create%20it%20with%20the%20issue%20and%20then%20give%20the%20set%20command%2C%20to%20see%20if%20the%20vswitch%20take%20the%20ip%20address%20of%20the%20physical%20nic.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20some%26nbsp%3B%20%22softies%22%20can%20say%20something%20about%20I'd%20like%20to%20hear.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EMarco%3C%2FP%3E%3C%2FLINGO-BODY%3E
Contributor

Hello,

 

I have installed Windows Server Core and then enabled the Hyper-V Role; I have created an external virtual switch with "Allow management operating system to share this network adapter" checked, on the external network with the nic where I have the management ip, i.e. 192.168.0.40;  I then created a guest virtual machine with Windows 10 and after installation I supposed it takes the network ip from dhcp, but it did not happen; so I tried to assign a static ip address, 192.168.0.41, but tried to do a ping vs the host but I receive an "host unreachable", so with all the addresses on the 192.168.0.x/24 network.

Where is my mistake? 

 

Marco

2 Replies

Hello,

 

I resolved the issue, but I don't no if it was initially my mistake or this is a but. I explain: in short, when I created with Hyper-V Manager from my Windows 10 machine the virtual switch the system doesn't bound the virtual ethernet created with the physical network adapter, so the virtual ethernet had an address like 169.256.xxx.xxx and it was impossible form the guest to communicate with an external network.

First, I tried to give an address of my network to the virtual adapter, but it not worked; after this I used the following powershell command to bound the physical and virtual network:

 

Set-VMSwitch -Name "External" -NetAdapterNme "Ethernet 2"

where "External" was the vswitch name while the "Ethernet 2" was the physical; to obtain the name of the latter I simply used the powershell command:

 

Get-NetAdapter

Now I have 2 tests to do to understand better if this is an issue: try to use powershell to create the external vswitch, using the cmdlet New-VMSwitch ("set" cmdlet worked, I don't know if "new" is working, seen the behavior of the user interface to create the external vswitch).

The second test is to not assign an ip to the external vswitch, but let the user interface create it with the issue and then give the set command, to see if the vswitch take the ip address of the physical nic.

 

If some  "softies" can say something about I'd like to hear.

 

Marco

Hi Marco,

 

The Hyper-V Host virtual NIC should not prevent a virtual machine from communicating through an external switch.  The Hyper-V vSwitch operates at layer 2, and as such, anyone on that broadcast domain should be able to pass traffic to the VM.

 

For example:

Host1 has the IP address of 10.10.10.1/24

Host2 has a vNIC named "vEthernet (vSwitchName)" has an IP of 169.254.x.x

VM 1 on host 2 has an IP of 10.10.10.2/24

 

If the Windows Firewall on VM2 allows ICMP-inbound (File and Print Sharing Group), then ping should work. Also, a Hyper-V VM should be able to receive DHCP from an external DHCP server so long as that DHCP server is broadcasting on the same L2 subnet.