Sdílet prostřednictvím


Add-SCVMHostCluster

Adds a Windows Server failover cluster, VMware ESX host cluster, or Citrix XenServer resource pool to VMM.

Syntax

Default (Default)

Add-SCVMHostCluster
    [-VMHostGroup <HostGroup>]
    [-VirtualizationManager <VirtualizationManager>]
    [-VMMServer <ServerConnection>]
    [-Name] <String>
    [-Description <String>]
    [-ClusterReserve <UInt32>]
    -Credential <VMMCredential>
    [-AddVMHostJobsListVariable <String>]
    [-VMPaths <String>]
    [-BaseDiskPaths <String>]
    [-RemoteConnectEnabled <Boolean>]
    [-RemoteConnectPort <UInt32>]
    [-EnableLiveMigration <Boolean>]
    [-LiveMigrationMaximum <UInt32>]
    [-LiveStorageMigrationMaximum <UInt32>]
    [-UseAnyMigrationSubnet <Boolean>]
    [-MigrationSubnet <String[]>]
    [-MigrationAuthProtocol <MigrationAuthProtocolType>]
    [-MigrationPerformanceOption <MigrationPerformanceOptionType>]
    [-Reassociate <Boolean>]
    [-NonTrustedDomainHost]
    [-RunAsynchronously]
    [-PROTipID <Guid>]
    [-JobVariable <String>]
    [<CommonParameters>]

Description

The Add-SCVMHostCluster cmdlet adds an existing Windows Server failover cluster, VMware ESX host cluster, or a Citrix XenServer resource pool to the Virtual Machine Manager (VMM) database so that VMM can manage the host cluster.

Before you can use the Add-SCVMHostCluster cmdlet to add a Windows Server cluster to VMM, you must use the Failover Cluster Management tool to create and configure the host cluster. To create a host cluster by using VMM, use the Install-SCVMHostCluster cmdlet.

Before you can use the Add-SCVMHostCluster cmdlet to add a Citrix XenServer resource pool to VMM, you must use Citrix XenCenter to create and configure the resource pool.

Before using Add-SCVMHostCluster to add ESX host clusters, you must use the Add-SCVirtualizationManager cmdlet to add a VMware vCenter Server to your VMM environment and import its data. After you add the vCenter Server to VMM, you can add and manage VMware ESX clusters using VMM.

Examples

Example 1: Add a failover cluster to VMM

PS C:\> $Credential = Get-SCRunAsAccount -Name "RunAsAccount01"
PS C:\> $VMHostGroup = Get-SCVMHostGroup | where {$_.Path -eq "All Hosts"}
PS C:\> Add-SCVMHostCluster -Name "VMHostCluster01.Contoso.com" -VMHostGroup $VMHostGroup -RemoteConnectEnabled $True -RemoteConnectPort 5900 -Credential $Credential

The first command gets the Run As account object named RunAsAccount01 and stores the object in the $Credential variable. The Run As account used for this operation must be a domain account with administrator rights on all the nodes of the failover cluster that you want to add.

The second command gets the host group object All Hosts. This is the host group that will be the container for the nodes in this host cluster.

The last command adds the failover cluster VMHostCluster01 to the VMM database, specifies All Hosts as the host group, enables remote connections, and specifies TCP port 5900 for remote connections to each node of the cluster. As the last command is processed, the $Credential variable provides the stored Run As account to Add-SCVMHostCluster.

Parameters

-AddVMHostJobsListVariable

Returns an array of job variable objects for jobs that are created for each node when hosts in a host cluster are added to VMM. VMM uses these job variables to track the progress of each job individually.

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

-BaseDiskPaths

Specifies the paths to base disks.

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

-ClusterReserve

Specifies the number of host failures that a host cluster can sustain before VMM designates the cluster as over-committed. The default value is 1.

Parameter properties

Type:UInt32
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

-Credential

Specifies a credential object or, for some cmdlets, a Run As account object that contains the user name and password of an account that has permission to perform this action. Or, in the case of Restart-SCJob, has permission to complete a restarted task.

For more information about the PSCredential object, type Get-Help Get-Credential. For more information about Run As accounts, type Get-Help New-SCRunAsAccount.

Parameter properties

Type:VMMCredential
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

-Description

Specifies a description for the host cluster.

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

-EnableLiveMigration

Indicates whether live migration is enabled on the host.

Parameter properties

Type:Boolean
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

-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

-LiveMigrationMaximum

Specifies the maximum number of simultaneous live migrations.

Parameter properties

Type:UInt32
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

-LiveStorageMigrationMaximum

Specifies the maximum number of simultaneous live storage migrations.

Parameter properties

Type:UInt32
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

-MigrationAuthProtocol

Specifies the authorization protocol used for migration. The acceptable values for this parameter are: CredSSP, Kerberos.

Parameter properties

Type:MigrationAuthProtocolType
Default value:None
Accepted values:CredSSP, Kerberos
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

-MigrationPerformanceOption

Specifies the migration performance option type. The acceptable values for this parameter are:

  • Standard
  • UseCompression
  • UseSmbTransport

Parameter properties

Type:MigrationPerformanceOptionType
Default value:None
Accepted values:Standard, UseCompression, UseSmbTransport
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

-MigrationSubnet

Specifies an array of subnets to use for migration.

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

-Name

Specifies the name of a VMM object.

Parameter properties

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

Parameter sets

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

-NonTrustedDomainHost

Indicates that the host to be added to VMM belongs to a non-trusted domain.

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

-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

-Reassociate

Reassociates a host currently managed by one VMM server with another VMM server.

Parameter properties

Type:Boolean
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

-RemoteConnectEnabled

Enables, when set to $True, a connection on a host server that lets users connect to their virtual machines remotely. This parameter only applies to virtual machines on Hyper-V hosts. It is not applicable to virtual machines on VMware ESX hosts or Citrix XenServer hosts.

Parameter properties

Type:Boolean
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

-RemoteConnectPort

Specifies a default value for the TCP port to use when a remote user connects to a virtual machine. Typically, the default port for a Hyper-V host is 2179. This parameter does not apply to VMware ESX hosts or Citrix XenServer hosts.

Parameter properties

Type:UInt32
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

-UseAnyMigrationSubnet

Indicates whether any subnet can be used for migration.

Parameter properties

Type:Boolean
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

-VirtualizationManager

Specifies a virtualization manager object managed by VMM.

Parameter properties

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

Parameter sets

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

-VMHostGroup

Specifies a virtual machine host group object.

Parameter properties

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

Parameter sets

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

-VMMServer

Specifies a VMM server object.

Parameter properties

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

Parameter sets

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

-VMPaths

Specifies a set of default paths (as strings separated by the pipeline operator) on a host where virtual machine files can be stored.

Example format: -VMPaths "C:\Folder1|C:\Folder2|C:\Folder3"

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

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

VMHostCluster

This cmdlet returns a VMHostCluster object.