vSphere PowerCLI Reference

New-Cluster

Synopsis

Creates a new cluster.

Syntax

New-Cluster [-HARestartPriority <HARestartPriority>] [-HAIsolationResponse <HAIsolationResponse>] [-VMSwapfilePolicy <VMSwapfilePolicy>] [-Name] <String> -Location <VIContainer> [-HAEnabled] [-HAAdmissionControlEnabled] [-HAFailoverLevel <Int32>] [-DrsEnabled] [-DrsMode <DrsMode>] [-DrsAutomationLevel <DrsAutomationLevel>] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-Cluster
Move-Cluster
Remove-Cluster
Set-Cluster

Detailed Description

Creates a new cluster with the provided inputs, in the location that is specified by the Location parameter.
HAEnabled is automatically set to $true if some of the HA settings, HAAdmissionControlEnabled, HAFailoverLevel, HARestartPriority, HAIsolationResponse, are specified .
DrsEnabled is automatically set to $true if some of the DRS settings, DrsAutomationLevel, DrsMode, are specified .

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
NameStringSpecify the name of the new cluster.truefalse
ConfirmSwitchParameterIf the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation.falsefalse$true
DrsAutomationLevelDrsAutomationLevelSpecify a DRS (Distributed Resource Scheduler) automation level. The valid values are FullyAutomated, Manual, and PartiallyAutomated.falsefalse
DrsEnabledSwitchParameterIndicate that VMware DRS (Distributed Resource Scheduler) is enabled.falsefalse
DrsModeDrsModeThis parameter is deprecated and scheduled for removal. Use the DrsAutomationLevel parameter instead. Specify a DRS (Distributed Resource Scheduler) mode. The valid values are FullyAutomated, Manual, and PartiallyAutomated.falsefalse
HAAdmissionControlEnabledSwitchParameterIndicate that virtual machines cannot be powered on if they violate availability constraints.falsefalse
HAEnabledSwitchParameterIndicate that VMware high availability is enabled.falsefalse
HAFailoverLevelInt32Specify a configured failover level. This is the number of physical host failures that can be tolerated without impacting the ability to meet minimum thresholds for all running virtual machines. The valid values range from 1 to 4.falsefalse
HAIsolationResponseHAIsolationResponseIndicate that the virtual machine should be powered off if a host determines that it is isolated from the rest of the compute resource. The valid values are PowerOff and DoNothing. Passing values to this parameter through a pipeline is deprecated and will be disabled in a future release.falsefalse
HARestartPriorityHARestartPrioritySpecify the cluster HA restart priority. The valid values are Disabled, Low, Medium, and High. VMware HA is a feature that detects failed virtual machines and automatically restarts them on alternative ESX hosts. Passing values to this parameter through a pipeline is deprecated and will be disabled in a future release.falsefalse
LocationVIContainerSpecify the location where you want to place the new cluster. If a datacenter is specified for the -Location parameter, the cluster is created in its "hostFolder" folder. The "hostFolder" is a system folder and is guaranteed to exist.truetrue (ByValue)
ServerVIServer[]Specify the vSphere servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer.falsefalse
VMSwapfilePolicyVMSwapfilePolicySpecify the swapfile placement policy. The following values are valid:

InHostDataStore - Store the swapfile in the datastore that is specified by the VMSwapfileDatastoreID property of the virtual machine host. If the VMSwapfileDatastoreID property is not set or indicates a datastore with unsufficient free space, store the swapfile in the same directory as the virtual machine. This setting might degrade VMotion performance.

WithVM - Store the swapfile in the same directory as the virtual machine.
falsefalse
WhatIfSwitchParameterIndicate that the cmdlet is run only to display the changes that would be made and actually no objects are modified.falsefalse

Return Type

Cluster

Notes

Examples

-------------- Example 1 --------------

$engineeringFolder = Get-Folder Engineering  New-Cluster -Location Folder -Name Cluster -DRSEnabled -DRSMode FullyAutomated

Creates a new cluster named Cluster in the Folder folder.


Copyright © 1998 - 2011 VMware, Inc. All rights reserved.