Add-ClusterVirtualMachineRole

Add-ClusterVirtualMachineRole

Create a clustered virtual machine, that is, a virtual machine that can be failed over if necessary to a different server in the failover cluster.

Syntax

Add-ClusterVirtualMachineRole [-InputObject <psobject>] -VirtualMachine <string> [[-Name] <string>] [-Cluster <string>] [<CommonParameters>]
  • InputObject

  • VirtualMachine

  • Name

  • Cluster

Detailed Description

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 (cluster node) fails or requires scheduled maintenance, another node begins to run the virtual machines instead (through a process known as failover). The VHD file for the clustered virtual machine must be on the clustered disk used by that virtual machine.

Parameters

Cluster

Specifies the name of the cluster to run this cmdlet on. If you type "-Cluster ." or omit the parameter, the cmdlet runs on the local cluster.

Default Value: **

Data Type: string

Attributes

Name Value PSMAML Attribute

Required?

false

required

Variable Length?

false

variableLength

Accept wildcard characters?

false

globbing

Accept Pipeline Input?

false

pipelineInput

Position?

named

position

Value Attributes

Name Value PSMAML Attribute

Required?

true

required

Variable Length?

false

variableLength

InputObject

Specifies the cluster to create the highly available virtual machine on.

Default Value: **

Data Type: psobject

Attributes

Name Value PSMAML Attribute

Required?

false

required

Variable Length?

false

variableLength

Accept wildcard characters?

false

globbing

Accept Pipeline Input?

true (ByValue)

pipelineInput

Position?

named

position

Value Attributes

Name Value PSMAML Attribute

Required?

true

required

Variable Length?

false

variableLength

Name

Specifies the name of the cluster highly available virtual machine to create.

Default Value: **

Data Type: string

Attributes

Name Value PSMAML Attribute

Required?

false

required

Variable Length?

false

variableLength

Accept wildcard characters?

false

globbing

Accept Pipeline Input?

false

pipelineInput

Position?

1

position

Value Attributes

Name Value PSMAML Attribute

Required?

true

required

Variable Length?

false

variableLength

VirtualMachine

Specifies the name of the virtual machine to make highly available. [Alias: vm]

Default Value: **

Data Type: string

Attributes

Name Value PSMAML Attribute

Required?

true

required

Variable Length?

false

variableLength

Accept wildcard characters?

false

globbing

Accept Pipeline Input?

false

pipelineInput

Position?

named

position

Value Attributes

Name Value PSMAML Attribute

Required?

true

required

Variable Length?

false

variableLength

Input Type

Microsoft.FailoverClusters.PowerShell.Cluster

Return Type

Microsoft.FailoverClusters.PowerShell.ClusterGroup

Examples

-------------------------- EXAMPLE 1 --------------------------

Command Prompt: C:\PS>

 
Add-ClusterVirtualMachineRole -VirtualMachine VM1 
 
Name                       OwnerNode                            State 
----                       ---------                            ----- 
Virtual Machine            node1                              Offline

Description

-----------

This command configures VM1 as a clustered virtual machine, and assigns a default name.

 

-------------------------- EXAMPLE 2 --------------------------

Command Prompt: C:\PS>

 
Add-ClusterVirtualMachineRole -VirtualMachine VM1 -Name "MainServer1" 
 
Name                       OwnerNode                            State 
----                       ---------                            ----- 
MainServer1                 node1                              Offline

Description

-----------

This command configures VM1 as a clustered virtual machine, and assigns the name MainServer1.

See Also

Reference

Update-ClusterVirtualMachineConfiguration
Move-ClusterVirtualMachineRole

Other Resources

Online version: