How to Configure NLB for a Service Tier
Updated: January 15, 2013
Applies To: System Center 2012 - Virtual Machine Manager, System Center 2012 SP1 - Virtual Machine Manager
Use the following procedure to configure Microsoft Network Load Balancing (NLB) for one or more tiers of a service template in Virtual Machine Manager (VMM). For example, you might configure a load balancer for a Web tier and for a middle business logic tier.
To support NLB, there are several prerequisites that must be met. These include fabric-related prerequisites, and specific operating system requirements and configuration settings that are required for the virtual machines that you want to load balance.
Important |
|---|
| You must configure a load balancer for a tier before you deploy a service. After you deploy a service, you cannot add a load balancer by updating the service. |
Account requirements To configure the fabric prerequisites, you must be an administrator or a delegated administrator. Delegated administrators can only configure the prerequisites that are within the scope of their user role. To add a load balancer to a service template, or to complete the virtual machine template prerequisites, you must be an administrator, a delegated administrator, or a member of a self-service user role that has the Author action in their scope.
Fabric Prerequisites
Before you begin this procedure, make sure that the following prerequisites are met:
-
Create a virtual IP (VIP) template for NLB. For more information, see How to Create VIP Templates for Network Load Balancing (NLB).
-
Create a logical network, with one or more associated network sites. Ensure that the network sites where users will deploy the service have one or more associated IP subnets that you can create static IP address pools from. Also, ensure that you associate each network site with the host group or one of its parent host groups where the service may be deployed.
For more information, see How to Create a Logical Network. -
Create static IP address pools that are associated with the network sites where users will deploy the service. The pools must be associated with the network sites where users will deploy the service. The IP address pools must contain a reserved range of virtual IP (VIP) addresses that can be assigned to the load balancer, and a range for the virtual machines that will be placed behind the load balancer.For more information, see How to Create IP Address Pools.
Important The addresses for the VIPs and the dedicated IP addresses for the virtual machines can be from the same pool or from different pools. However, the VIP address and the dedicated virtual machine IP addresses must all be in the same subnet. -
On each host where the service may be deployed, ensure that a physical network adapter on the host is configured to use the same logical network that the service tier will use. For example, if the tier will use the BACKEND logical network, the BACKEND logical network must be associated with a physical adapter on the host. For more information, see How to Configure Network Settings on a Hyper-V Host.
Virtual Machine Template Prerequisites
When you use the Create VM Template wizard to create a virtual machine template for a service tier that you want to load balance by using NLB, or if you have an existing virtual machine template that you want to use, verify that the following prerequisites are met:
Note |
|---|
| The following table lists only the required settings for NLB. Configure other settings according to your virtual machine requirements. For information about how to create a virtual machine template for a service tier, see How to Create a Virtual Machine Template. |
| NLB Requirements | More Information | ||||||
|---|---|---|---|---|---|---|---|
|
Ensure that the operating system for the virtual hard disk is an appropriate version, as listed under “More information.” |
One of the requirements is that you install the NLB feature in the guest operating system. To install features through VMM, for System Center 2012, the guest operating system must be set to Windows Server 2008 R2. For System Center 2012 SP1, it can be set to Windows Server 2008 R2 or Windows Server 2012.
|
||||||
|
Configure the network adapter to use a logical network with static IP address assignment, static MAC addresses, and, depending on the hypervisor that you want to deploy the service to, enable MAC address spoofing. |
On the Configure Hardware page of the Create VM Template wizard (or the Hardware Configuration tab in the properties of an existing virtual machine template), click a network adapter, and then do the following:
To update a virtual machine template, use the following syntax, where VMTemplate01 represents the name of the virtual machine template: PS C:\> $VMTemplate = Get-SCVMTemplate -Name "VMTemplate01" PS C:\> $VirtNetworkAdapter = Get-SCVirtualNetworkAdapter -VMTemplate $VMTemplate PS C:\> Set-SCVirtualNetworkAdapter -VirtualNetworkAdapter $VirtNetworkAdapter -EnableMACAddressSpoofing $True To update a hardware profile, use the following syntax, where HWProfile01 represents the name of the virtual hardware profile:
PS C:\> $HWProfile = Get-SCHardwareProfile | where { $_.Name -eq "HWProfile01" }
PS C:\> $VirtNetworkAdapter = Get-SCVirtualNetworkAdapter -HardwareProfile $HWProfile
PS C:\> Set-SCVirtualNetworkAdapter -VirtualNetworkAdapter $VirtNetworkAdapter -EnableMACAddressSpoofing $True
|
||||||
|
Set the administrator password |
On the Configure Operating System page of the Create VM Template wizard (or the OS Configuration tab in the properties of an existing virtual machine template), under General Settings, click Admin Password. Either specify the password of the local administrator account or select a Run As account for the local administrator account.
|
||||||
|
Configure the virtual machine to join a domain |
On the Configure Operating System page of the Create VM Template wizard (or the OS Configuration tab in the properties of an existing virtual machine template), under Networking, configure the virtual machine to join a domain. This includes the credentials to join the domain.
|
||||||
|
Enable the Network Load Balancing feature |
On the Configure Operating System page of the Create VM Template wizard (or the OS Configuration tab in the properties of an existing virtual machine template), do the following:
|
After you have a virtual machine template that meets the virtual machine template prerequisites, create a service template that uses the virtual machine template. The following procedure assumes you have an existing service template. For information about how to create a service template, see How to Create a Service Template in VMM.
To add an NLB load balancer to a service tier
-
Open an existing service template that meets the prerequisites that are outlined in the “Virtual Machine Template Prerequisites” section of this topic. To do this, follow these steps:
-
Open the Library workspace.
-
In the Library pane, expand Templates, and then click Service Templates.
-
In the Templates pane, click the service template that you want to open.
-
On the Service Template tab, in the Actions group, click Open Designer.
The Virtual Machine Manager Service Template Designer opens with the service template displayed.
-
Open the Library workspace.
-
Click the virtual machine template that represents the tier that you want to load balance. In the virtual machine template details pane, select the This computer tier can be scaled out check box, and configure the number of instances.
-
On the Home tab, in the Service Template Components group, click Add Load Balancer.
Note This action is only available if VIP templates are defined in the Fabric workspace. Only a full administrator or delegated administrator can configure VIP templates. -
Make sure that the correct VIP template for NLB is selected. To do this, follow these steps:
-
Click the load balancer object (identifiable by the VIP template name) that is added to the service map.
-
In the load balancer details, in the Load Balancer VIP Profile list, select a different VIP template if needed.
-
Verify that the Load Balancer Model field indicates Network Load Balancing (NLB).
-
Click the load balancer object (identifiable by the VIP template name) that is added to the service map.
-
Configure the load balancer connection to a virtual network adapter for the service tier.
-
On the Home tab, in the Tools group, click the Connector tool to select it.
-
On the service map, click the Server connection object that is associated with the load balancer, and then click a NIC object (for example, click the network adapter for the BACKEND logical network). This connects the load balancer to the network adapter.
-
Click the NIC object to display its properties in the detail area. Verify that the IPv4 address type, the IPv6 address type, or both types (depending on the logical network configuration) are static, and that the MAC address type is static.
-
On the Home tab, in the Tools group, click the Connector tool to select it.
-
Configure the client connection for the load balancer to use the correct logical network. With the Connector tool still selected, on the service map, click the Client connection object that is associated with the load balancer, and then click a logical network object. For example, click the BACKEND logical network. This connects the load balancer to the logical network.
Important For NLB deployments, the logical network that is associated with the client connection and the logical network of the NIC that is associated with the server connection in step 5 must be the same. -
Save the updated service template settings. On the Home tab, in the Service Template group, click Save and Validate.
Important |
|---|
When the service is deployed, VMM automatically selects a virtual IP address from the reserved range that is defined in the static IP address pool, and assigns it to the load-balanced service tier. To enable users to connect to the service, the following must occur:
|
See Also
-----
For additional resources, see Information and Support for System Center 2012.
Tip: Use this query to find online documentation in the TechNet Library for System Center 2012. For instructions and examples, see Search the System Center 2012 Documentation Library.
-----
