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

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