Add-ClusterVirtualMachineRole
Add-ClusterVirtualMachineRole
Creates a clustered virtual machine, that is, a virtual machine that can be failed over if necessary to a different server in the failover cluster.
構文
Parameter Set: InputObject
Add-ClusterVirtualMachineRole [[-VMName] <String> ] [-Cluster <String> ] [-InputObject <PSObject> ] [-Name <String> ] [-VirtualMachine <String> ] [-VMId <Guid> ] [ <CommonParameters>]
詳細説明
The Add-ClusterVirtualMachineRole cmdlet creates a clustered virtual machine, that is, a virtual machine that can be failed over if necessary to a different server in the failover cluster.
By creating clustered virtual machines, you can consolidate multiple servers on one physical server without causing that server to become a single point of failure. Instead, if that server, or cluster node, fails or requires scheduled maintenance, then another node begins to run the virtual machines instead through a process known as failover. The virtual hard disk (VHD) file for the clustered virtual machine must be on the clustered disk used by that virtual machine.
Note:このコマンドレットは、サーバー コンピューターに Credential Security Service Provider (CredSSP) 認証がない場合、リモートで実行できません。
パラメーター
-Cluster<String>
Specifies the name of the cluster on which to run this cmdlet. If the input for this parameter is .
or it is omitted, then the cmdlet runs on the local cluster.
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-InputObject<PSObject>
Specifies the cluster on which to create the highly available virtual machine.
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
true (ByValue) |
ワイルドカード文字を許可する |
false |
-Name<String>
Specifies the name of the highly available virtual machine to create.
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-VMId<Guid>
Specifies the virtual machine identifier (ID).
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
true (ByPropertyName) |
ワイルドカード文字を許可する |
false |
-VMName<String>
Specifies the name of the virtual machine to make highly available. Use either the VirtualMachine parameter or the VMName parameter to specify the name of the virtual machine.
エイリアス |
なし |
必須? |
false |
位置は? |
1 |
既定値 |
なし |
パイプライン入力を許可する |
true (ByPropertyName) |
ワイルドカード文字を許可する |
false |
-VirtualMachine<String>
Specifies the name of the virtual machine to make highly available. Use either the VirtualMachine parameter or the VMName parameter to specify the name of the virtual machine.
エイリアス |
vm |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
<CommonParameters>
このコマンドレットは次の共通パラメーターをサポートします。-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、-OutVariable.詳細については、以下を参照してください。 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。
入力
入力型は、コマンドレットにパイプできるオブジェクトの型です。
- Microsoft.FailoverClusters.PowerShell.Cluster
出力
出力型は、コマンドレットによって生成されるオブジェクトの型です。
- Microsoft.FailoverClusters.PowerShell.ClusterGroup
例
Example 1
This example configures VM1 as a clustered virtual machine, and assigns a default name.
PS C:\> Add-ClusterVirtualMachineRole -VirtualMachine VM1
Example 2
This example configures VM1 as a clustered virtual machine, and assigns the name MainServer1.
PS C:\> Add-ClusterVirtualMachineRole -VirtualMachine VM1 -Name "MainServer1"
Example 3
This example queries for virtual machines matching the wildcard characters *print* and configures them as clustered virtual machines.
PS C:\> Get-VM –Name *print* | Add-ClusterVirtualMachineRole
関連トピック
Move-ClusterVirtualMachineRole
Update-ClusterVirtualMachineConfiguration
Get-VM