Saturday, April 24, 2010

Windows 2008 R2 NLB using virtual machines in HyperV not working

During last week I had to configure a Windows NLB for two Exchange 2010 with Client Access Role. The machines were installed as virtual machines in Windows 2008 R2 HyperV architecture. Both virtual machines were configured with two network cards, one of them dedicated for NLB. We configured the NLB using Unicast. You can find an excellent article about configuring CAS NLB http://www.msexchange.org/articles_tutorials/exchange-server-2007/high-availability-recovery/load-balancing-exchange-2007-client-access-servers-windows-network-technology-part1.html
After configuring the NLB, I found out that the IP address of the NLB was not accessible from nowhere else then the nodes of the NLB cluster.
This actually occured because as part of the cluster setup process (when using Unicast) the MAC address of the interface used in the NLB on each of the servers that becomes part of the cluster is changed to a common and different MAC address to anything currently on the servers. This occurs on the server, and the hypervisor knows nothing about it. This way the MAC address 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.
To solve the problem I had to modify MAC address settings for each NLB network card configured in virtual machines.
The Hyper-V Synthetic Network Adapter does not allow you to dynamically modify the MAC address. A legacy network adapter does, but a Hyper-V Legacy Network Adapter does but does not support x64. To change MAC address for virtual machines you have shut down the virtual machines and go into the properties of the Hyper-V Synthetic Network Adapter used for NLB. I modified two settings:
- I changed the Ethernet (MAC) address setting the MAC address to Static, using Generate button.
- I selected the Enable spoofing of MAC address. This allows the guest operating system of a Hyper-V virtual machine to provide an alternate MAC address to the one that the virtual machine provides. This option is new option in VMM 2008 R2. If you use Windows Server 2008, this capability is automatic in Hyper-V, in Windows Server 2008 R2, the feature is turned off by default.

2 comments:

  1. Hi, all is going perfectly here and ofcourse every one is
    sharing data, that's really good, keep up writing.
    My homepage : Adfoc.us Auto

    ReplyDelete
  2. Awesome article! I have gradually become fan of your article and would like to suggest putting some new updates to make it more effective.

    ReplyDelete