Install-SCVMHostCluster
从 VMM 管理的 Hyper-V 主机创建故障转移群集。
语法
Install-SCVMHostCluster
-VMHost <Host[]>
-ClusterName <String>
-Credential <VMMCredential>
[-ClusterIPAddress <String[]>]
[-ClusterIPAddressPool <StaticIPAddressPool[]>]
[-ClusterReserve <Int32>]
[-Description <String>]
[-VMMServer <ServerConnection>]
[-SetQuorumNodeMajority]
[-SetQuorumDisk <ClientObject>]
[-SkipValidation]
[-JobGroup <Guid>]
[-EnableS2D]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[<CommonParameters>]
Install-SCVMHostCluster
-VMHost <Host[]>
-VMHostCluster <HostCluster>
-Credential <VMMCredential>
[-VMMServer <ServerConnection>]
[-SkipValidation]
[-JobGroup <Guid>]
[-EnableS2D]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[<CommonParameters>]
Install-SCVMHostCluster
-PhysicalComputerConfig <PhysicalComputerConfig[]>
-VMHostCluster <HostCluster>
-Credential <VMMCredential>
[-VMMServer <ServerConnection>]
[-SkipValidation]
[-JobGroup <Guid>]
[-EnableS2D]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[<CommonParameters>]
Install-SCVMHostCluster
-PhysicalComputerConfig <PhysicalComputerConfig[]>
-ClusterName <String>
-Credential <VMMCredential>
[-ClusterIPAddress <String[]>]
[-ClusterIPAddressPool <StaticIPAddressPool[]>]
[-ClusterReserve <Int32>]
[-Description <String>]
[-VMMServer <ServerConnection>]
[-SetQuorumNodeMajority]
[-SkipValidation]
[-JobGroup <Guid>]
[-EnableS2D]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[<CommonParameters>]
说明
注意
VMM 2019 UR1 中包括一个新参数 [-DCBSettings ]。 有关详细信息,请参阅参数。
Install-SCVMHostCluster cmdlet 从 Virtual Machine Manager (VMM) 管理的 Hyper-V 主机创建故障转移群集。 Install-SCVMHostCluster 还可以将节点添加到现有群集。
示例
示例 1:从托管主机创建群集
PS C:\> $RunAsAcct = Get-SCRunAsAccount -Name "RunAsAccount01"
PS C:\> $HostGroup = Get-SCVMHostGroup -Name "New York"
PS C:\> $Nodes = Get-SCVMHost | where {$_.Name -like "HostClus*" -and $_.VMHostGroup -eq $HostGroup}
PS C:\> Install-SCVMHostCluster -VMHost $Nodes -ClusterName "Cluster01" -Credential $RunAsAcct
第一个命令获取名为 RunAsAccount01 的运行方式帐户,并将其存储在$RunAsAcct变量中。
第二个命令获取名为纽约的主机组对象,并将对象存储在$HostGroup变量中。
第三个命令获取以存储在$HostGroup中的主机组中的名称 HostClus 开头的群集节点。 然后,该命令将节点存储在$Nodes变量中。
最后一个命令创建群集并将其命名为 Cluster01。
示例 2:从托管主机创建超聚合群集
PS C:\> $RunAsAcct = Get-SCRunAsAccount -Name "RunAsAccount01"
PS C:\> $HostGroup = Get-SCVMHostGroup -Name "New York"
PS C:\> $Nodes = Get-SCVMHost | where {$_.Name -like "HostClus*" -and $_.VMHostGroup -eq $HostGroup}
PS C:\> Install-SCVMHostCluster -VMHost $Nodes -ClusterName "Cluster01" -Credential $RunAsAcct -EnableS2D
第一个命令获取名为 RunAsAccount01 的运行方式帐户,然后将其存储在$RunAsAcct变量中。
第二个命令获取名为纽约的主机组对象,然后将其存储在$HostGroup变量中。
第三个命令获取以存储在$HostGroup中的主机组中的名称 HostClus 开头的群集节点。 该命令将节点存储在$Nodes变量中。
最后一个命令创建超聚合群集并将其命名为 Cluster01。
参数
-ClusterIPAddress
指定要用作群集 IP 地址的一个或多个 IP 地址。
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ClusterIPAddressPool
指定要用作群集 IP 地址池的静态 IP 地址池。
Type: | StaticIPAddressPool[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ClusterName
指定群集的名称。
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ClusterReserve
指定主机群集可接受的主机故障数,如果超过此数字,VMM 会将该群集指定为过载。 默认值为 1。
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Credential
指定凭据对象,或者,对于某些 cmdlet,一个运行方式帐户对象,该对象包含有权执行此操作的帐户的用户名和密码。 或者,对于 Restart-SCJob,有权完成重启的任务。
有关 PSCredential 对象的详细信息,请键入 Get-Help Get-Credential
。
有关运行方式帐户的详细信息,请键入 Get-Help New-SCRunAsAccount
。
Type: | VMMCredential |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DCBSettings
指定群集上配置的 DCB 设置。
注意
此参数适用于 VMM 2019 UR1。
Type: | DCBSettings |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Description
指定主机群集的说明。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-EnableS2D
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-JobGroup
在运行最后一个包含相同作业组标识符的命令之前,为作为集合运行的一系列命令指定标识符。
Type: | Guid |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-JobVariable
指定跟踪作业进度,并将其存储在此参数命名的变量中。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PhysicalComputerConfig
指定主机配置对象的数组。
有关主机配置对象的信息,请参阅 New-SCVMHostConfig cmdlet。
Type: | PhysicalComputerConfig[] |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PROTipID
指定触发此操作 (PRO 提示) 的性能和资源优化提示的 ID。 此参数允许审核 PRO 提示。
Type: | Guid |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RunAsynchronously
指示作业异步运行,以便控件立即返回到命令 shell。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SetQuorumDisk
指定要用作群集仲裁磁盘的磁盘。
Type: | ClientObject |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SetQuorumNodeMajority
将仲裁模式设置为群集的节点多数。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SkipValidation
创建群集时跳过群集验证测试。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VMHost
指定虚拟机主机对象的数组。
Type: | Host[] |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VMHostCluster
指定 VMM 主机群集对象。
Type: | HostCluster |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VMMServer
指定VMM 服务器对象。
Type: | ServerConnection |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
输出
VMHostCluster
此 cmdlet 返回 VMHostCluster 对象。