Consider the following scenario:
You’ve deployed your Virtual Machines on Hyper-V hosts that are running Windows Server 2012 or 2012 R2. Everything appears to be running swimmingly. However, you soon start to experience the following symptoms:
- Virtual machines randomly lose network connectivity. The network adapter appears to be working in the virtual machine. However, you cannot ping or access network resources from the virtual machine. Restarting the virtual machine does not resolve the issue
- You cannot ping or connect to a virtual machine from a remote computer, you are only able to connect via the Hyper-V console
When this occurs, the only fix is to restart the Hyper-V host. Restarting the VM does not resolve the issue. This also does not address the underlying issue as to why this is occurring in the first place.
This issue has been around for sometime, with Microsoft acknowledging and discussing ithere. However, this only refers to the “NetXtreme 1-gigabit network adapters”, which in my case were not being used. Looking a little deeper, the issue affected a broader number of network adapters, all of which used common components manufactured by a company called Emulex. If you were using an affected adapter on a Windows Server 2012 or 2012 R2 Hyper-V host, and you had Virtual Machine Queue (VMQ) enabled, you could potentially see this issue.
VMQ is only relevant if the network adapters used on your Hyper-V hosts are 10-gigabit or faster. In my case, all adapters were 1-gigabit, meaning I could simply disable VMQ and see if that resolved my problem. To check whether or not VMQ is enabled, run the following:
Set-NetAdaptervmq -Name “Embedded LOM 1 Port 2” -Enabled $false
Alternatively, you can also disable from Device Manager:
Once you have disabled VMQ on the adapter, make sure you also disable it from the Hardware Acceleration menu from Setting on all Virtual Machines
This resolved the issue for me.