Home > Virtualisation > Enable NLB in a Hyper-V Guest

Enable NLB in a Hyper-V Guest

Monday, April 27, 2009 Leave a comment Go to comments

If you work with Exchange 2007 or Terminal Services/Remote Desktop Services in any anger, you’ve probably had to use Network Load Balancing (NLB) to balance services. For example I use it for the Client Access and Hub Transport roles in Exchange 2007, and to balance requests across my Terminal Services (Remote Desktop) Gateway servers. However, when virtualising these services, I found that Hyper-V doesn’t always play nice with NLB.

Ok, first things first. The method differs between Hyper-V (the current release) and Hyper-V R2 (Microsoft’s future release, currently a Release Candidate). I’ll describe both here. Also please note this article assumes you’re also running Windows Server 2008 guests too; I don’t have any experience with earlier OS’s so your mileage may vary.

Hyper-V (Hyper-V Server 2008 and Windows Server 2008)

First up, you’ll need a hotfix from Microsoft. You can grab it here. Although the hotfix itself doesn’t require a reboot, one of the following steps will so be warned.

Once you’ve done this, build your NLB cluster as normal and as you go through, make sure you take a note of the Cluster IP MAC address when you get to the “Cluster Parameters” screen, after adding an IP address.

You’ll notice though that your cluster doesn’t converge. No worries! It’s meant to do that.

Now you’ll need to reboot your Hyper-V guest. So, shut it down (or, if you’re in a failover cluster, use Failover Cluster Manager to shut down the guest) and edit the settings of the Hyper-V Guest. You’ll need to change the MAC address of your guest from Dynamic (the default) to static, putting in the Cluster IP MAC address you noted earlier. You did note it down, right?

Hyper-V R2 (Hyper-V Server 2008 R2 and Windows Server 2008 R2)

With Hyper-V R2 things are a little easier – although contrary to Microsoft’s current documentation you’ll still need to reboot your guest OS. First up, unless your Guest OS is also R2, you’ll need to install the hotfix noted above. However, rather than having to note the cluster’s MAC address, you’ll simply need to change the Hyper-V guest settings to enable MAC Spoofing:

Please note that, although the documentation says that you can do this whilst the guest is online, I wasn’t able to do this – it required me shutting down the guest and changing the settings whilst it was off. Hopefully this will be changed in the RTM release!

  1. Rogier
    Wednesday, August 25, 2010 at 6:53 am | #1

    Not working, unfortunately. The VM looses its gateway address as soon as nlb gets enabled, so no more network for the vm. Environment: 2008 VM on 2008R2 host.

  2. saulw
    Wednesday, May 18, 2011 at 10:49 pm | #3

    Thanks for the Tip with Windows Server 2008 R2, it really saved my day!

  1. Friday, December 4, 2009 at 8:26 pm | #1
  2. Monday, June 27, 2011 at 10:27 pm | #2
  3. Tuesday, July 26, 2011 at 5:27 pm | #3
  4. Monday, August 8, 2011 at 1:08 pm | #4

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.