New-SCLoadBalancerTemplate

Creates a load balancer template that can be added to a service template.

Syntax

New-SCLoadBalancerTemplate
   -ComputerTierTemplate <ComputerTierTemplate>
   -LoadBalancerVIPTemplate <LoadBalancerVIPTemplate>
   -VirtualNetworkAdapter <VirtualNetworkAdapter>
   [-VMNetworkVIP <VMNetwork>]
   [-VMNetworkServiceSetting <String>]
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [<CommonParameters>]
New-SCLoadBalancerTemplate
   -ComputerTierTemplate <ComputerTierTemplate>
   -LoadBalancerVIPTemplate <LoadBalancerVIPTemplate>
   -VirtualNetworkAdapter <VirtualNetworkAdapter>
   -LogicalNetworkVIP <LogicalNetwork>
   [-VMNetworkVIP <VMNetwork>]
   [-VMNetworkServiceSetting <String>]
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [<CommonParameters>]

Description

The New-SCLoadBalancerTemplate cmdlet creates a load balancer template that you can add to a service template. When you deploy a service instance based on the service template, Virtual Machine Manager (VMM) locates an appropriate load balancer in your VMM environment during placement, and configures it based on the properties provided in the load balancer template.

Examples

Example 1: Create a load balancer template

PS C:\> $ServiceTemplate = Get-SCServiceTemplate -Name "ServiceTemplate01"
PS C:\> $TierTemplate = Get-SCComputerTierTemplate -ServiceTemplate $ServiceTemplate
PS C:\> $LBVIPTemplate = Get-SCLoadBalancerVIPTemplate -Manufacturer "LB Manufacturer" -Model "LB01"
PS C:\> $VMTemplate = Get-SCVMTemplate -ComputerTierTemplate $TierTemplate
PS C:\> $Adapter = Get-SCVirtualNetworkAdapter -VMTemplate $VMTemplate
PS C:\> $LBTemplate = New-SCLoadBalancerTemplate -ComputerTierTemplate $TierTemplate -LoadBalancerVIPTemplate $LBVIPTemplate -VirtualNetworkAdapter $Adapter
PS C:\> $LBTemplate

The first command gets the service template object named ServiceTemplate01 and stores the object in the $ServiceTemplate variable.

The second command gets the computer tier template for the service template stored in $ServiceTemplate (in this case, ServiceTemplate01) and stores the object in the $TierTemplate variable.

The third command gets the load balancer VIP template with the manufacturer of LB Manufacturer and model LB01, and stores the template in the $LBVIPTemplate variable.

The fourth command gets the virtual machine template for the computer tier template stored in $TierTemplate.

The fifth command gets the virtual network adapter for the virtual machine template stored in $VMTemplate.

The sixth command creates a load balancer template using the computer tier template, load balancer template, and virtual network adapter objects obtained in the previous commands, and stores the object in the $LBTemplate variable.

The last command displays information about the load balancer template.

Parameters

-ComputerTierTemplate

Specifies a computer tier template object.

Type:ComputerTierTemplate
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-JobVariable

Specifies that job progress is tracked and stored in the variable named by this parameter.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-LoadBalancerVIPTemplate

Specifies a load balancer virtual IP (VIP) template.

Type:LoadBalancerVIPTemplate
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-LogicalNetworkVIP

Specifies the logical networks from which the front-end IP address for the load balancer should be assigned (the front-end logical network affinity).

Type:LogicalNetwork
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-PROTipID

Specifies the ID of the Performance and Resource Optimization tip (PRO tip) that triggered this action. This parameter lets you audit PRO tips.

Type:Guid
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-RunAsynchronously

Indicates that the job runs asynchronously so that control returns to the command shell immediately.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-VirtualNetworkAdapter

Specifies a virtual network adapter object for a virtual machine.

The maximum number of virtual network adapters varies by the type of host. If the host type is Hyper-V, the maximum number of virtual network adapters is:

  • Up to four emulated adapters per virtual machine.
  • Up to eight synthetic adapters per virtual machine. An exception is that no driver is available for an emulated network adapter on a Windows Server 2003 x64 guest.

If the host type is VMware ESX:

  • Up to four emulated adapters per virtual machine.

If the host type is Citrix XenServer:

  • Up to seven emulated adapters per virtual machine.
Type:VirtualNetworkAdapter
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-VMNetworkServiceSetting

Specifies a virtual machine network service setting.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-VMNetworkVIP

Specifies a VMNetwork object.

Type:VMNetwork
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Outputs

LoadBalancerTemplate

This cmdlet returns a LoadBalancerTemplate object.