New-SCLoadBalancerTemplate
Applies To: System Center 2012 - Virtual Machine Manager
New-SCLoadBalancerTemplate
Creates a load balancer template that can be added to a service template.
Syntax
Parameter Set: Default
New-SCLoadBalancerTemplate -ComputerTierTemplate <ComputerTierTemplate> -LoadBalancerVIPTemplate <LoadBalancerVIPTemplate> -VirtualNetworkAdapter <VirtualNetworkAdapter> [-JobVariable <String> ] [-LogicalNetworkVIP <LogicalNetwork> ] [-PROTipID <Guid> ] [-RunAsynchronously] [ <CommonParameters>]
Detailed Description
The New-SCLoadBalancerTemplate creates a load balancer template that you can add to a service template. When you deploy a service instance based on the service template, System Center Virtual Machine Manager (VMM) will locate an appropriate load balancer in your VMM environment during placement, and configure it based on the properties provided in the load balancer template.
For more information about New-SCLoadBalancerTemplate, type: "Get-Help New-SCLoadBalancerTemplate -online".
Parameters
-ComputerTierTemplate<ComputerTierTemplate>
Specifies a computer tier template object.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
true (ByValue) |
Accept Wildcard Characters? |
false |
-JobVariable<String>
Specifies that job progress is tracked and stored in the variable named by this parameter.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-LoadBalancerVIPTemplate<LoadBalancerVIPTemplate>
Specifies a load balancer virtual IP (VIP) template.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-LogicalNetworkVIP<LogicalNetwork>
Specifies the logical networks from which the front-end IP address for the load balancer should be assigned (the front-end logical network affinity).
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-PROTipID<Guid>
Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-RunAsynchronously
Indicates that the job runs asynchronously so that control returns to the command shell immediately.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-VirtualNetworkAdapter<VirtualNetworkAdapter>
Specifies a virtual network adapter object for a virtual machine.
TYPE OF HOST NUMBER OF VIRTUAL NETWORK ADAPTERS
------------ ----------------------------------
Hyper-V Up to 4 emulated adapters per virtual machine.
Up to 8 synthetic adapters per virtual machine.
(Exception: no driver available for an emulated
network adapter on a Windows Server 2003 x64 guest.)
VMware ESX Up to 4 emulated adapters per virtual machine.
Citrix XenServer Up to 7 emulated adapters per virtual machine.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters.
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
Outputs
The output type is the type of the objects that the cmdlet emits.
- LoadBalancerTemplate
Examples
1: Create a load balancer template.
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 to the user.
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