NLB on Hyper-V, a gotcha!
Note: The instruction below refer to Windows Server 2008. Windows Server 2008 R2 has an 'allow spoofing' checkbox which should be used instead.
When setting up NLB in a virtualised environment, there’s an extra step that you might need to take to get everything working that doesn’t seem to be mentioned very often. Here’s the scenario:
- You have two or more Windows Server 2003 virtualised servers running as Hyper-V guests that you want to run as a NLB cluster (see the note at the bottom of this post for details on Server 2008)
- You’ve followed best practice and fixed the MAC/IP addresses of the network interface(s) you’re going to bind NLB to on each of the servers you’re planning to use in the cluster
- You’ve got a cluster IP address ready to go and the correct DNS entries already in place
- You go ahead to create the cluster
- You try to ping/access the cluster address from a computer that is not part of the cluster and all you see are timeouts
This actually occurs because as part of the cluster setup process, the MAC address of the interface you bind NLB to on each of the servers that becomes part of the cluster is changed to a common and different MAC address to anything currently on your servers. Note that this occurs on the server, and the hypervisor knows nothing about it. Suddenly, the fixed MAC address you set up within Hyper-V on the interfaces used by NLB bears no relation to the MAC address that the cluster thinks it’s using on the guest machines themselves and no traffic is routed to that interface.
The solution is simple; manually set the MAC address of the interface you’ve bound NLB to on each server in the virtual machine Hyper-V settings to the MAC address assigned by the NLB service to the network interface within the guest and it should all spring into life!
The situation with Windows Server 2008 is also slightly more complicated due to a missing configuration in the Hyper-V environment, which is corrected by a hotfix you apply to the virtual machine. See KB953828 for further details (correcting the MAC address issue to also discussed in KB article).
For Server 2008 R2, the virtual machine network adaptor settings include an 'enable spoofing of MAC address' checkbox, which should be used instead of the above solution. This allows the Hyper-V virtual network to use the MAC address reported by the operating system instead of the MAC address that the Hyper-V host thinks is in use. Another of my blog posts details this: /wp-content/uploads/sites/14/historic/archive/2009/09/21/guest-nlb-issues-on-hyper-v-windows-server-2008-r2.aspx
Technorati Tags: NLB,network load balancing,virtualisation,Windows Server 2003,Windows Server 2008,Hyper-V