Mike Laurencelle

I'm a SharePoint & Server Systems Administrator for Sears Home Improvement Products, headquartered in sunny Longwood, Florida. My primary functions revolve around SharePoint and Virtualization technologies.

I've been in the IT industry now for about 18 years. For me, IT is more than a job to make a living, more than a career to call my own. It's my passion. I am a self proclaimed geek and have interest in all things technology. I can't imagine being in any other field - I absolutely love what I do.

Creating an NLB Cluster using Hyper-V


Posted on : 2:00 PM | By : Mike Laurencelle | In : ,

I was trying to create my first Hyper-V VM based NLB cluster and found it is somewhat different from doing the same on either hardware or with Virtual Server 2005. So, I thought I’d share my experience and what worked for me in the hopes that it will help someone else avoid the issues I faced.

I was getting very frustrated because I kept creating the cluster only to find that I couldn’t ping the cluster address that resulted and, in many cases, could ping only one of the two NICs that were attached to the VMs. I tried re-creating the cluster, removing and re-adding the Virtual NICs, repairing the NICs, removing all traces of them in the registry and re-adding them – nothing worked.

After continued troubleshooting I noticed that only one of the two Virtual NICs was showing up with a MAC address assigned. I checked the VM properties to get the appropriate MAC address assigned and then I was able to ping both Virtual NICs. Hurray! Problem solved! Not quite…

As soon as I created the cluster, I noticed I couldn’t ping the public Virtual NIC IP again or the NLB Cluster IP. Banging the head against my desk must have cleared the cobwebs because it was then that it occurred to me what the problem was. When you create an NLB cluster with two NICs using unicast, as part of the cluster creation process, the MAC address of the public NIC is replaced with a new MAC address that the NLB cluster shares. Because of this and the new way that Hyper-V and it’s virtual switches work, this causes a problem and Hyper-V needs to be made aware of the new MAC address.

Here are the steps to get this working below.    

1.       Create your two separate VMs, either on the same host or on separate hosts for additional redundancy. Make sure that both VMs have TWO Virtual Network Adapters. 

2.       Find the MAC address that has been dynamically assigned to each of the two virtual NICs on each VM.

3.       You will find that, in the OS of the VM, that one of the two NICs has the MAC address appropriately defined but the other does not. Make sure that both have their MAC address correctly defined. 
a.     Open the properties for the Network Adapter in the Guest VM’s OS.
b.     Click the Configure button and click on the Advanced tab. 
c.     Set the Value to the MAC address Hyper-V assigned that you looked up in Step 2. 
d.     Click OK to save your changes. 

4.       Create your NLB cluster like usual, using Unicast made, which will replace the individual MAC addresses of the public NICs on each node with the NLB cluster’s shared MAC. During the creation of the NLB cluster, you may receive an error that all properties could not be assigned. This would be because the MAC gets changed before the IP address is assigned. So, you will have to manually add the cluster IP address in the TCP/IP Advanced Properties for that NIC. 
a.       Click the Properties button for TCP/IPv4.
b.     Click the Advanced button. 
c.     Click the Add button. 

d.     Enter the NLB cluster’s shared IP address & subnet mask. 

e.     Click OK 3 times to save changes. 

5.       Now it’s time for to get it all working by setting the NLB cluster’s MAC as the MAC assigned to that Virtual NIC in Hyper-V. This will need to be done for the public Virtual NIC on both nodes of the NLB cluster. You can find this MAC by looking at the properties of the NLB cluster you just created.

6.       Now, you’ll need to shut down both nodes of the NLB cluster because you can’t change the MAC address settings for the VM while it is turned on. 

7.       Once they are turned off, go into the VM settings and select the Virtual NIC that is the public NIC for the NLB cluster and change from a dynamic MAC to a static MAC to match that of the NLB cluster. 

Voila! Once you turn the VM’s back on, the NLB cluster configuration will be complete. Both nodes will show as converged in the NLB manager, and all three IP addresses (public, private, and cluster) will be pingable from both nodes and from other computers on the network. 

As a side note, from some research I did, this apparently isn’t a problem if you use the Legacy Network Adapters available in Hyper-V instead of the standards Network Adapters that are used by default. However, these Legacy Network Adapters do not work properly in a x64 OS and are not supported. 

Share this :

  • Stumble upon
  • twitter

Comments (7)

I just stumbled across after a full day of frustration at work trying to figure this out!

You've just saved me an overnight stay at work, and I may actually have a weekend!


Great post, thank you. To add: if hyper-v host is running R2 you must check "Enable spoofing of MAC addresses" on the network adapter properties of the virtual server.

thank u very much, I have tried by this way and it worked for me.

I sincerely appreciate your effort in making this blog.

"As a side note, from some research I did, this apparently isn’t a problem if you use the Legacy Network Adapters available in Hyper-V instead of the standards Network Adapters that are used by default. However, these Legacy Network Adapters do not work properly in a x64 OS and are not supported."

Are you stating that the standard network adapters will not work in HV R1? We are trying to cluster 2008 x64 with synthetic "standard" network adapters. The problem is that they lose network connectivity and I see errors about duplicate MAC addresses in HV. Error ID: 12562 Static MAC address conflicts with another adapter.

Thanks, just what I was looking for. I am still little bit unclear why only Unicast would work with Hyper-V - let's see if it'll work with my application...

Great explanation about configuring NLB using Hyper-V VM's. With spoofing in 2008 R2 , I am able to setup nlb succesfully. However, would like to ask one question here. How we are making sure that both NIC's (Network interface Card in each VM) configured in each VM are usefull ?

I am using VirtualBox with Network Load Balancing on 2 guest OSs running Server 2008, but the same principle applied. When I added the MAC address for the NLB instance to the VM network setups in the VirtualBox console, everything worked after I booted the VMs back up.

Thank you so much for pointing me in the right direction!