Why are my HyperV VM's randomly losing connectivity?

Solution 1:

We used to have a problem like this where I'm at. I don't remember the exact details, but the final solution had to do with a conflicting mac address assigned dynamically to a virtual network adapter. Pinning those down so they weren't dynamic helped a lot. You normally don't want to do that because it can make it harder to move a virtual machine to a different host, but it helped us in this instance.

The other part is the physical nics were made by broadcom and we also had a configuration error there, where a previous admin had tried incorrectly to use the broadcom utility to trunk the two nics together on the host for improved bandwidth/throughput. We removed that setup and configured one of the nics so it had no IP at all on the host machine, but could still be used for passthrough to virtual guests. Then we set each virtual machine to only use one nic or the other, balancing the load based on historical traffic. Of course that means no failover if an adapter or connection goes down, and we haven't followed through well to see whether traffic has remained balanced over time, but it's been rock solid stable since then.

Solution 2:

I am aware that this is an old question, but I encountered the same issue and wasted so much time getting it resolved that I thought I would share the solution that worked for me. I found the solution to my problem here:

http://invendows.wordpress.com/2008/03/06/network-issue-with-hyper-v/

The solution in my situation was to disable TCP Offloading on the VMs. I will quote the relevant section from the link:

In order to to disable TCP Offloading I had to create and set a new registry value in each VM connected to the Broadcom 8507 Nextreme II NIC.

I used the following registry change to disable TCP Offloading:

Key: HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters

Value(DWORD): DisableTaskOffload = 1

After disabling TCP offload on each VM this way all trouble was over and I was able to connect multiple VMs to one NIC port of the Broadcom 5708 Nextreme II NIC.

My server has Broadcom NetExtreme NICs, so it seems for me the cause of this issue was definitely driver related, but setting DisableTaskOffload = 1 resolved the issue completely for me. Hope that this information saves someone else hours of searching!


Solution 3:

I have run into something similar in a much simpler Hyper-V environment, and ran across this article at Microsoft. Seems to fit with your situation if the web servers are heavily used.

http://support.microsoft.com/kb/974909 - The network connection of a running Hyper-V virtual machine is lost under heavy outgoing network traffic on a Windows Server 2008 R2-based computer


Solution 4:

We had this same problem, though in our case it was every 24-48 hours. I would double-check that your antivirus/firewall product spcefically supports Server 2008 with Hyper-V, if not, try a different (or temporarily removing if feasible) your anti-virus/firewall product as a test to see if the issue goes away.

After a call to Microsoft and several dump/log file uploads later, they determined that TrendMicro OfficeScan was the culprit in our case. We were using a version that turned out to not be explicitly supported on Hyper-V, once we upgraded to the latest release, the problem went away.


Solution 5:

This turned out to be a hardware issue -- I isolated the problem to a Netgear GSM7224v2 managed switch, replaced it with a D-Link DGS-1024D, and everything has been working fine ever since.

As a "lesson learned," in this case I probably spent 99% of my diagnostic effort troubleshooting software settings for what turned out to be a hardware issue. I even paid Microsoft Support $259 (and spent a lot of time on the phone with them) to help me figure it out by poking around at software settings. I guess the moral of the story is to suspect your hardware just as much as your software.