Welcome to MSDN Blogs Sign in | Join | Help

Network Load Balancing (NLB) and virtual machines

There is a fair amount of confusion about the state of using Windows network load balancing (NLB) when it comes to Microsoft virtual machines.  Today I am (hopefully) going to set the record straight.  When using NLB with Microsoft virtual machines you need to be aware of the following issues:

  1. Virtual Server / Virtual PC will not utilize any NLB capabilities on the host operating system.  This is because Virtual Server / Virtual PC perform their network operations at a lower layer on the host network stack than NLB.  Note - Virtual Server and Virtual PC will function correctly when NLB is present on the host - they will just not benefit from it.

  2. Virtual Server / Virtual PC have some network optimizations that actually cause problems when running NLB systems inside of virtual machines.  These optimizations are simply that if we see a network packet that is going from the host to a virtual machine, or from a virtual machine to another virtual machine, we will send the packet directly to that virtual machine - without sending a copy of it on to the physical network connection.  Similarly if we see a network packet coming into the physical computer that is destined for the host operating system - we will not send it on to any of the virtual machines.

    Now - these optimizations cause problems with NLB because NLB creates its own virtual MAC address that is shared amongst all the NLB servers - which means that we cannot tell when a packet should go just to the host, a virtual machine or everyone.  Because of this we see the following results:

    1. NLB works with virtual machines - if everything (client and NLB servers) is on separate host systems.  It also works if some systems are physical computers, and some virtual machines - as long as each server / client is on a separate computer.

    2. NLB works when all the NLB servers are virtualized and placed on the same physical computer.  Obviously this is only useful for non-production environments.

    3. Any other configuration will fail (e.g. having a virtualized client hosted on a physical NLB server node, having a virtualized client and virtualized NLB server node on one box, with other NLB server nodes on remote systems)

Cheers,
Ben

Published Tuesday, March 21, 2006 8:09 PM by Virtual PC Guy

Comments

Wednesday, March 22, 2006 10:23 AM by Clive Watson's Weblog

# Network Load Balancing (NLB) and virtual machines - explained

Ben clears up any confusion you may have with Virtual Server or VPC and NLB in this article from...
Thursday, March 23, 2006 9:10 AM by VMblog.com

# Network Load Balancing and Microsoft Virtual Machines

Ben Armstrong sets the record straight about using Microsoft network load balancing and Microsoft...
Monday, March 27, 2006 12:54 PM by dan palley

# re: Network Load Balancing (NLB) and virtual machines

Thanks for the explanation.  We've had good luck running NLB in VS so far.

Would it be possible to include an option to turn the network optimization feature off and pass all network requests to the physical network connection?

Regards,

Dan Palley
Monday, March 27, 2006 7:58 PM by Joseph

# re: Network Load Balancing (NLB) and virtual machines

We are trying to run NLB on virtual machines in config 1 above (client, server 1, server 2 and SQL server 2005 all on different physical machines) but we are running into problems.  The issue is that one of the app servers will work, but the other throws an error about the connection being dropped talking to the SQL server.  In config 2 everything works fine.  Any ideas what might be causing this?
Thanks,
Joseph
Sunday, April 02, 2006 8:22 PM by Virtual PC Guy

# re: Network Load Balancing (NLB) and virtual machines

Dan -

Yes - we are hoping to address this at some stage.

Joseph -

I have no idea why it would be failing in config 1.

Cheers,
Ben
Wednesday, April 05, 2006 5:31 PM by Rohan

# re: Network Load Balancing (NLB) and virtual machines

hi,
i am a support engg. for microsoft (setup team)
and would like to know if there are any
KB articles/SOX documentation with regards to
NLB and Virtual Server 2005 R2.

thnx,
Rohan
Thursday, April 13, 2006 5:37 AM by Erik

# re: Network Load Balancing (NLB) and virtual machines

Lokking at point 2 - NLB works when all the NLB servers are virtualized and placed on the same physical computer - I think this will only work when having 2 network interfaces installed on the host.

Otherwise you will get a "No interfaces are available for installing a new cluster" error message.

Bye, Erik
Wednesday, April 19, 2006 4:35 AM by Angelo

# re: Network Load Balancing (NLB) and virtual machines

I'm trying to set up a Terminal services farm(hosts) with NLB, thses hosts are virtual machines hosted on a system running Virtual server 2005 R2.

I've configured the interfaces (NLB) manually an then tried to access the cluster from "Network balancing Manager".... and I can't see all hosts only one of them appears...

As far as I understand it should work based on your explanation... but I've not been able to dom it... Eric wrote that a second physical adapter must be inserted on the host machine... can you shed the light on this ?

# Thomas Shinder Blog » Blog Archive » ISA Firewalls, NLB and Virtualization

Tuesday, April 10, 2007 4:44 PM by Virtual Server tapasztalatok « gubus 2.0

# Virtual Server tapasztalatok « gubus 2.0

# DIY: Secure Virtual Machine Network In A Box at x86 Virtualization

New Comments to this post are disabled
 
Page view tracker