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.
Sintaxis
Parameter Set: InputObject
Add-ClusterVirtualMachineRole [[-VMName] <String> ] [-Cluster <String> ] [-InputObject <PSObject> ] [-Name <String> ] [-VirtualMachine <String> ] [-VMId <Guid> ] [ <CommonParameters>]
Descripción detallada
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: Este cmdlet no se puede ejecutar de forma remota sin la autenticación del proveedor de servicio de seguridad de credenciales (CredSSP) en el equipo servidor.
Parámetros
-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.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-InputObject<PSObject>
Specifies the cluster on which to create the highly available virtual machine.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
true (ByValue) |
¿Aceptar caracteres comodín? |
false |
-Name<String>
Specifies the name of the highly available virtual machine to create.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-VMId<Guid>
Specifies the virtual machine identifier (ID).
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
true (ByPropertyName) |
¿Aceptar caracteres comodín? |
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.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
1 |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
true (ByPropertyName) |
¿Aceptar caracteres comodín? |
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.
Alias |
vm |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
<CommonParameters>
Este cmdlet admite los siguientes parámetros comunes: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer y -OutVariable. Para obtener más información, consulte about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Entradas
El tipo de entrada es el tipo de los objetos que se pueden canalizar al cmdlet.
- Microsoft.FailoverClusters.PowerShell.Cluster
Salidas
El tipo de resultado es el tipo de objetos que emite el cmdlet.
- Microsoft.FailoverClusters.PowerShell.ClusterGroup
Ejemplos
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
Temas relacionados
Move-ClusterVirtualMachineRole
Update-ClusterVirtualMachineConfiguration
Get-VM