Guest NLB issues on Hyper-V (Windows Server 2008 R2)

One of the issues I’ve seen during our migration of virtual machines to our new Windows Server 2008 R2 Hyper-V cluster relates to network load balancing (NLB).  We have a number of NLB setups running which will need migrating in time.  My first test migration of a pair of NLB virtual machines (actually, technically a trio of servers making up a SharePoint farm) didn’t go as smoothly as I’d hoped.

The machines in question have been running on a Windows Server 2008 Hyper-V machine quite happily for some time.  I followed the procedure we’ve used to migrate other machines to our new Windows Server 2008 R2 Hyper-V cluster, connecting both network adaptors to the appropriate network when the import had completed.  When I looked at the network settings in the GUI, two network adaptors showed up and the configuration at first glance seemed okay.  When looking at the network configuration using ipconfig however, only the values for one network adaptor (the primary, i.e. non-NLB, adaptor) were shown, with the NLB adaptor missing in action.

In addition, NLB manager showed the following error when I tried to reconfigure the cluster:

adaptor misconfigured detail

The solution to the issue is actually simple; in the Hyper-V VM settings for the NLB network adaptor, turn on MAC address spoofing:

enable spoofing of MAC address

This immediately fixed the issues we were seeing with the NLB adaptor of the machines we were migrating.

8 Replies to “Guest NLB issues on Hyper-V (Windows Server 2008 R2)”

  1. My understanding for why this error pops up (as I just did the same thing a few days ago) is that while NLB is giving your two NICs the same MAC address on the guest (VM) level, Hyper-V still believes it’s dynamically giving MAC addresses at the host level. The way I got around this (and I believe the way Microsoft suggests) is to setup NLB, as you did, and then turn off your VMs and give the NICs the same static MAC address that NLB attempts them. That way both Hyper-V and NLB will agree on the MAC addresses. Just another way to get around this problem.

  2. Hi David, That was the route I initially took to getting our NLB machines up and running on Hyper-V R2. I found I had to have MAC address spoofing turned on, otherwise it wouldn’t work at all for me. On Server 2008, we didn’t have the same option, and configuring as you’ve mentioned (see also /wp-content/uploads/sites/14/historic/archive/2009/02/17/nlb-on-hyper-v-a-gotcha.aspx for some information on this) was the way to get things setup.

  3. Hi Mark, Yes, you can use multicast for NLB without having to enable spoofing on the VM adaptor, however multicast usually requries changes to be made to setup of the networking infrastructure. Note that the best practice recommendation is to use unicast. It does require more configuration on the server, but generally makes life a _lot_ easier than using multicast. Andy

  4. We set up a new NLB cluster on Win 2008 R2 virtual machines that were hosted by Win 2008 R2 Hyper-V Core hosts. Everything worked fine as long as we hit the apps on this cluster from the internal network (actually from the same subnet). When we routed an external public internet IP address to the app, however, the requests died somewhere in our network and never returned a response.

    We finally figured out the problem. We were using the same configuration pattern from our Win 2003 clusters, creating each virtual machine node with 2 virtual NICs and leaving the (TCP/IPv4) Default Gateway and DNS Server addresses blank on the 2nd NIC that was used for the NBL cluster. This was supposed to force local traffic onto the 1st NIC and NLB traffic onto the 2nd. Anyway, when we completed the configuration on the 2nd NIC, filling in the Default Gateway and DNS Server, everything began working correctly and the cluster began handling external internet traffic.

  5. I agree with the post above – you NEED a default gateway on the NIC used for the NLB cluster!

    I have the following setup that I finally got working.

    2 x physical Hyper-V 2008 R2 Servers.

    2 x VM with 2008 R2 installed – each one on a separate physical server.

    Install 2 NICs in each VM, and enable MAC spoofing on the NLB cluster NIC. Configure a normal Unicast NLB, and it should work.

  6. We’ve seen this issue many times when setting up NLB; it seems to be necessary (contrary to the documentation I’ve found) that a gateway IS needed on the second NIC to make everything work correctly.

Leave a Reply

Your email address will not be published.