Install-SCVMHostCluster
從 VMM 管理的 Hyper-V 主機建立容錯移轉叢集。
Syntax
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>]
Description
注意
VMM 2019 UR1 中包含新的參數 [-DCBSettings ]。 如需詳細資訊,請參閱參數。
Install-SCVMHostCluster Cmdlet 會從 Virtual Machine Manager 所管理的 Hyper-V 主機建立容錯移轉叢集, (VMM) 。 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 變數中。
第二個命令會取得名為 New York 的主機群組物件,並將物件儲存在$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變數中。
第二個命令會取得名為 New York 的主機群組物件,然後將它儲存在$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 提示) 效能和資源優化提示的識別碼。 此參數可讓您稽核 PRO 秘訣。
Type: | Guid |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RunAsynchronously
表示作業會以非同步方式執行,讓控制項立即返回命令殼層。
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 物件。