Freigeben über


New-SCLoadBalancerTemplate

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

Syntax

Default (Default)

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

LogicalNetworkVIP

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.

Parameter properties

Type:ComputerTierTemplate
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-JobVariable

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-LoadBalancerVIPTemplate

Specifies a load balancer virtual IP (VIP) template.

Parameter properties

Type:LoadBalancerVIPTemplate
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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).

Parameter properties

Type:LogicalNetwork
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

LogicalNetworkVIP
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

Type:Guid
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RunAsynchronously

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

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

Type:VirtualNetworkAdapter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-VMNetworkServiceSetting

Specifies a virtual machine network service setting.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-VMNetworkVIP

Specifies a VMNetwork object.

Parameter properties

Type:VMNetwork
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Outputs

LoadBalancerTemplate

This cmdlet returns a LoadBalancerTemplate object.