How to Configure a Hardware Load Balancer for a Service Tier
Updated: May 13, 2016
Applies To: System Center 2012 SP1 - Virtual Machine Manager, System Center 2012 R2 Virtual Machine Manager, System Center 2012 - Virtual Machine Manager
In Virtual Machine Manager (VMM), a service is a set of virtual machines that are configured and deployed together and are managed as a single entity—for example, a deployment of a multi-tier line-of-business application. Use the following procedures to configure a hardware load balancer for one or more tiers of a service template in VMM. For example, you might configure a load balancer for a Web tier and for a middle business logic tier.
A load balancer must be configured before you deploy a service. After a service is deployed, 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, 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.
Before you begin this procedure, make sure that the following prerequisites are met:
Create the desired logical networks, 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 IP address pool must contain a reserved range of virtual IP addresses that can be assigned to the load balancer. You must set up the static IP address pools for the load balancer and for the virtual machines that will be placed behind the load balancer. These can be from the same pool or from different pools, but the environment must have both virtual IP addresses and IP addresses for the virtual machines. For more information, see How to Create IP Address Pools.
Configure a hardware load balancer in VMM. You must have a supported hardware load balancer, and you must have installed the load balancer provider on the VMM management server. When you configure the load balancer, you must select the host group or one of its parent host groups where the service may be deployed. Also, when you configure logical network affinity, make sure that you select the logical networks from which the load balancer can obtain its virtual IP address as the front-end, and the logical networks to which you want to make the load balancer available for connections from the virtual machines that make up a service tier as the back-end. For more information, see How to Add Hardware Load Balancers.
Create a virtual IP (VIP) template for the hardware load balancer. For more information, see How to Create VIP Templates for Hardware Load Balancers.
Ensure that the hosts where the service may be deployed can access the load balancer. Therefore, the host group where the load balancer is available must be the host group of the virtual machine host or one of its parent host groups.
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, How to Configure Network Settings on a VMware ESX Host, and How to Configure Network Settings on a Citrix XenServer Host.
For an overview of the load balancer workflow, see the "Load Balancer Integration" section of Configuring Networking Overview.
To add a load balancer to a service tier
Open the service template in the Virtual Machine Manager Service Template Designer. 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.
On the Home tab, in the Service Template Components group, click Add Load Balancer.
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.
Click the load balancer object (identifiable by the VIP template name) that is added to the service map. In the load balancer details, select a different VIP template if needed.
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.
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.
Save the updated service template settings. On the Home tab, in the Service Template group, click Save and Validate.
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:
- A full administrator or delegated administrator must determine the virtual IP address that VMM assigned to the load balancer.
- After the virtual IP address is determined, a Domain Name System (DNS) administrator must manually create a DNS entry for the virtual IP address. The DNS entry for the virtual IP address should be the name that users will specify to connect to the service, for example ServiceName.contoso.com.
For more information, see How to Determine the Virtual IP Address for a Service.