Show / Hide Table of Contents

Class ComputeCluster

A note on the naming of this resource: VMware refers to clusters of hosts in the UI and documentation as clusters, HA clusters, or DRS clusters. All of these refer to the same kind of resource (with the latter two referring to specific features of clustering). We use vsphere..ComputeCluster to differentiate host clusters from datastore clusters, which are clusters of datastores that can be used to distribute load and ensure fault tolerance via distribution of virtual machines. Datastore clusters can also be managed through the provider, via the vsphere..DatastoreCluster resource.

The vsphere..ComputeCluster resource can be used to create and manage clusters of hosts allowing for resource control of compute resources, load balancing through DRS, and high availability through vSphere HA.

For more information on vSphere clusters and DRS, see this page. For more information on vSphere HA, see this page.

NOTE: This resource requires vCenter and is not available on direct ESXi connections.

NOTE: vSphere DRS requires a vSphere Enterprise Plus license.

vSphere Version Requirements

A large number of settings in the vsphere..ComputeCluster resource require a specific version of vSphere to function. Rather than include warnings at every setting or section, these settings are documented below. Note that this list is for cluster-specific attributes only, and does not include the tags parameter, which requires vSphere 6.0 or higher across all resources that can be tagged.

All settings are footnoted by an asterisk (*) in their specific section in the documentation, which takes you here.

Settings that require vSphere version 6.0 or higher

These settings require vSphere 6.0 or higher:

  • ha_datastore_apd_recovery_action
  • ha_datastore_apd_response
  • ha_datastore_apd_response_delay
  • ha_datastore_pdl_response
  • ha_vm_component_protection

Settings that require vSphere version 6.5 or higher

These settings require vSphere 6.5 or higher:

  • drs_enable_predictive_drs
  • ha_admission_control_host_failure_tolerance (When ha_admission_control_policy is set to resourcePercentage or slotPolicy. Permitted in all versions under failoverHosts)
  • ha_admission_control_resource_percentage_auto_compute
  • ha_vm_restart_timeout
  • ha_vm_dependency_restart_condition
  • ha_vm_restart_additional_delay
  • proactive_ha_automation_level
  • proactive_ha_enabled
  • proactive_ha_moderate_remediation
  • proactive_ha_provider_ids
  • proactive_ha_severe_remediation
Inheritance
System.Object
Resource
CustomResource
ComputeCluster
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.VSphere
Assembly: Pulumi.VSphere.dll
Syntax
public class ComputeCluster : CustomResource

Constructors

View Source

ComputeCluster(String, ComputeClusterArgs, CustomResourceOptions)

Create a ComputeCluster resource with the given unique name, arguments, and options.

Declaration
public ComputeCluster(string name, ComputeClusterArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

ComputeClusterArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

CustomAttributes

A map of custom attribute ids to attribute value strings to set for the datastore cluster.

Declaration
public Output<ImmutableDictionary<string, string>> CustomAttributes { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.String>>
View Source

DatacenterId

The managed object ID of the datacenter to create the cluster in. Forces a new resource if changed.

Declaration
public Output<string> DatacenterId { get; }
Property Value
Type Description
Output<System.String>
View Source

DpmAutomationLevel

The automation level for host power operations in this cluster. Can be one of manual or automated. Default: manual.

Declaration
public Output<string> DpmAutomationLevel { get; }
Property Value
Type Description
Output<System.String>
View Source

DpmEnabled

Enable DPM support for DRS in this cluster. Requires drs_enabled to be true in order to be effective. Default: false.

Declaration
public Output<bool?> DpmEnabled { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

DpmThreshold

A value between 1 and 5 indicating the threshold of load within the cluster that influences host power operations. This affects both power on and power off operations - a lower setting will tolerate more of a surplus/deficit than a higher setting. Default: 3.

Declaration
public Output<int?> DpmThreshold { get; }
Property Value
Type Description
Output<System.Nullable<System.Int32>>
View Source

DrsAdvancedOptions

A key/value map that specifies advanced options for DRS and DPM.

Declaration
public Output<ImmutableDictionary<string, string>> DrsAdvancedOptions { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.String>>
View Source

DrsAutomationLevel

The default automation level for all virtual machines in this cluster. Can be one of manual, partiallyAutomated, or fullyAutomated. Default: manual.

Declaration
public Output<string> DrsAutomationLevel { get; }
Property Value
Type Description
Output<System.String>
View Source

DrsEnabled

Enable DRS for this cluster. Default: false.

Declaration
public Output<bool?> DrsEnabled { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

DrsEnablePredictiveDrs

When true, enables DRS to use data from [vRealize Operations Manager][ref-vsphere-vro] to make proactive DRS recommendations. <sup>*</sup>

Declaration
public Output<bool?> DrsEnablePredictiveDrs { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

DrsEnableVmOverrides

Allow individual DRS overrides to be set for virtual machines in the cluster. Default: true.

Declaration
public Output<bool?> DrsEnableVmOverrides { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

DrsMigrationThreshold

A value between 1 and 5 indicating the threshold of imbalance tolerated between hosts. A lower setting will tolerate more imbalance while a higher setting will tolerate less. Default: 3.

Declaration
public Output<int?> DrsMigrationThreshold { get; }
Property Value
Type Description
Output<System.Nullable<System.Int32>>
View Source

Folder

The relative path to a folder to put this cluster in. This is a path relative to the datacenter you are deploying the cluster to. Example: for the dc1 datacenter, and a provided folder of foo/bar, The provider will place a cluster named compute-cluster-test in a host folder located at /dc1/host/foo/bar, with the final inventory path being /dc1/host/foo/bar/datastore-cluster-test.

Declaration
public Output<string> Folder { get; }
Property Value
Type Description
Output<System.String>
View Source

ForceEvacuateOnDestroy

When destroying the resource, setting this to true will auto-remove any hosts that are currently a member of the cluster, as if they were removed by taking their entry out of host_system_ids (see below). This is an advanced option and should only be used for testing. Default: false.

Declaration
public Output<bool?> ForceEvacuateOnDestroy { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

HaAdmissionControlFailoverHostSystemIds

Defines the managed object IDs of hosts to use as dedicated failover hosts. These hosts are kept as available as possible - admission control will block access to the host, and DRS will ignore the host when making recommendations.

Declaration
public Output<ImmutableArray<string>> HaAdmissionControlFailoverHostSystemIds { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>
View Source

HaAdmissionControlHostFailureTolerance

The maximum number of failed hosts that admission control tolerates when making decisions on whether to permit virtual machine operations. The maximum is one less than the number of hosts in the cluster. Default: 1. <sup>*</sup>

Declaration
public Output<int?> HaAdmissionControlHostFailureTolerance { get; }
Property Value
Type Description
Output<System.Nullable<System.Int32>>
View Source

HaAdmissionControlPerformanceTolerance

The percentage of resource reduction that a cluster of virtual machines can tolerate in case of a failover. A value of 0 produces warnings only, whereas a value of 100 disables the setting. Default: 100 (disabled).

Declaration
public Output<int?> HaAdmissionControlPerformanceTolerance { get; }
Property Value
Type Description
Output<System.Nullable<System.Int32>>
View Source

HaAdmissionControlPolicy

The type of admission control policy to use with vSphere HA. Can be one of resourcePercentage, slotPolicy, failoverHosts, or disabled. Default: resourcePercentage.

Declaration
public Output<string> HaAdmissionControlPolicy { get; }
Property Value
Type Description
Output<System.String>
View Source

HaAdmissionControlResourcePercentageAutoCompute

Automatically determine available resource percentages by subtracting the average number of host resources represented by the ha_admission_control_host_failure_tolerance setting from the total amount of resources in the cluster. Disable to supply user-defined values. Default: true. <sup>*</sup>

Declaration
public Output<bool?> HaAdmissionControlResourcePercentageAutoCompute { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

HaAdmissionControlResourcePercentageCpu

Controls the user-defined percentage of CPU resources in the cluster to reserve for failover. Default: 100.

Declaration
public Output<int?> HaAdmissionControlResourcePercentageCpu { get; }
Property Value
Type Description
Output<System.Nullable<System.Int32>>
View Source

HaAdmissionControlResourcePercentageMemory

Controls the user-defined percentage of memory resources in the cluster to reserve for failover. Default: 100.

Declaration
public Output<int?> HaAdmissionControlResourcePercentageMemory { get; }
Property Value
Type Description
Output<System.Nullable<System.Int32>>
View Source

HaAdmissionControlSlotPolicyExplicitCpu

Controls the user-defined CPU slot size, in MHz. Default: 32.

Declaration
public Output<int?> HaAdmissionControlSlotPolicyExplicitCpu { get; }
Property Value
Type Description
Output<System.Nullable<System.Int32>>
View Source

HaAdmissionControlSlotPolicyExplicitMemory

Controls the user-defined memory slot size, in MB. Default: 100.

Declaration
public Output<int?> HaAdmissionControlSlotPolicyExplicitMemory { get; }
Property Value
Type Description
Output<System.Nullable<System.Int32>>
View Source

HaAdmissionControlSlotPolicyUseExplicitSize

Controls whether or not you wish to supply explicit values to CPU and memory slot sizes. The default is false, which tells vSphere to gather a automatic average based on all powered-on virtual machines currently in the cluster.

Declaration
public Output<bool?> HaAdmissionControlSlotPolicyUseExplicitSize { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

HaAdvancedOptions

A key/value map that specifies advanced options for vSphere HA.

Declaration
public Output<ImmutableDictionary<string, string>> HaAdvancedOptions { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.String>>
View Source

HaDatastoreApdRecoveryAction

Controls the action to take on virtual machines if an APD status on an affected datastore clears in the middle of an APD event. Can be one of none or reset. Default: none. <sup>*</sup>

Declaration
public Output<string> HaDatastoreApdRecoveryAction { get; }
Property Value
Type Description
Output<System.String>
View Source

HaDatastoreApdResponse

Controls the action to take on virtual machines when the cluster has detected loss to all paths to a relevant datastore. Can be one of disabled, warning, restartConservative, or restartAggressive. Default: disabled. <sup>*</sup>

Declaration
public Output<string> HaDatastoreApdResponse { get; }
Property Value
Type Description
Output<System.String>
View Source

HaDatastoreApdResponseDelay

Controls the delay in minutes to wait after an APD timeout event to execute the response action defined in ha_datastore_apd_response. Default: 3 minutes. <sup>*</sup>

Declaration
public Output<int?> HaDatastoreApdResponseDelay { get; }
Property Value
Type Description
Output<System.Nullable<System.Int32>>
View Source

HaDatastorePdlResponse

Controls the action to take on virtual machines when the cluster has detected a permanent device loss to a relevant datastore. Can be one of disabled, warning, or restartAggressive. Default: disabled. <sup>*</sup>

Declaration
public Output<string> HaDatastorePdlResponse { get; }
Property Value
Type Description
Output<System.String>
View Source

HaEnabled

Enable vSphere HA for this cluster. Default: false.

Declaration
public Output<bool?> HaEnabled { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

HaHeartbeatDatastoreIds

The list of managed object IDs for preferred datastores to use for HA heartbeating. This setting is only useful when ha_heartbeat_datastore_policy is set to either userSelectedDs or allFeasibleDsWithUserPreference.

Declaration
public Output<ImmutableArray<string>> HaHeartbeatDatastoreIds { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>
View Source

HaHeartbeatDatastorePolicy

The selection policy for HA heartbeat datastores. Can be one of allFeasibleDs, userSelectedDs, or allFeasibleDsWithUserPreference. Default: allFeasibleDsWithUserPreference.

Declaration
public Output<string> HaHeartbeatDatastorePolicy { get; }
Property Value
Type Description
Output<System.String>
View Source

HaHostIsolationResponse

The action to take on virtual machines when a host has detected that it has been isolated from the rest of the cluster. Can be one of none, powerOff, or shutdown. Default: none.

Declaration
public Output<string> HaHostIsolationResponse { get; }
Property Value
Type Description
Output<System.String>
View Source

HaHostMonitoring

Global setting that controls whether vSphere HA remediates virtual machines on host failure. Can be one of enabled or disabled. Default: enabled.

Declaration
public Output<string> HaHostMonitoring { get; }
Property Value
Type Description
Output<System.String>
View Source

HaVmComponentProtection

Controls vSphere VM component protection for virtual machines in this cluster. Can be one of enabled or disabled. Default: enabled. <sup>*</sup>

Declaration
public Output<string> HaVmComponentProtection { get; }
Property Value
Type Description
Output<System.String>
View Source

HaVmDependencyRestartCondition

The condition used to determine whether or not virtual machines in a certain restart priority class are online, allowing HA to move on to restarting virtual machines on the next priority. Can be one of none, poweredOn, guestHbStatusGreen, or appHbStatusGreen. The default is none, which means that a virtual machine is considered ready immediately after a host is found to start it on. <sup>*</sup>

Declaration
public Output<string> HaVmDependencyRestartCondition { get; }
Property Value
Type Description
Output<System.String>
View Source

HaVmFailureInterval

If a heartbeat from a virtual machine is not received within this configured interval, the virtual machine is marked as failed. The value is in seconds. Default: 30.

Declaration
public Output<int?> HaVmFailureInterval { get; }
Property Value
Type Description
Output<System.Nullable<System.Int32>>
View Source

HaVmMaximumFailureWindow

The length of the reset window in which ha_vm_maximum_resets can operate. When this window expires, no more resets are attempted regardless of the setting configured in ha_vm_maximum_resets. -1 means no window, meaning an unlimited reset time is allotted. The value is specified in seconds. Default: -1 (no window).

Declaration
public Output<int?> HaVmMaximumFailureWindow { get; }
Property Value
Type Description
Output<System.Nullable<System.Int32>>
View Source

HaVmMaximumResets

The maximum number of resets that HA will perform to a virtual machine when responding to a failure event. Default: 3

Declaration
public Output<int?> HaVmMaximumResets { get; }
Property Value
Type Description
Output<System.Nullable<System.Int32>>
View Source

HaVmMinimumUptime

The time, in seconds, that HA waits after powering on a virtual machine before monitoring for heartbeats. Default: 120 (2 minutes).

Declaration
public Output<int?> HaVmMinimumUptime { get; }
Property Value
Type Description
Output<System.Nullable<System.Int32>>
View Source

HaVmMonitoring

The type of virtual machine monitoring to use when HA is enabled in the cluster. Can be one of vmMonitoringDisabled, vmMonitoringOnly, or vmAndAppMonitoring. Default: vmMonitoringDisabled.

Declaration
public Output<string> HaVmMonitoring { get; }
Property Value
Type Description
Output<System.String>
View Source

HaVmRestartAdditionalDelay

Additional delay in seconds after ready condition is met. A VM is considered ready at this point. Default: 0 (no delay). <sup>*</sup>

Declaration
public Output<int?> HaVmRestartAdditionalDelay { get; }
Property Value
Type Description
Output<System.Nullable<System.Int32>>
View Source

HaVmRestartPriority

The default restart priority for affected virtual machines when vSphere detects a host failure. Can be one of lowest, low, medium, high, or highest. Default: medium.

Declaration
public Output<string> HaVmRestartPriority { get; }
Property Value
Type Description
Output<System.String>
View Source

HaVmRestartTimeout

The maximum time, in seconds, that vSphere HA will wait for virtual machines in one priority to be ready before proceeding with the next priority. Default: 600 (10 minutes). <sup>*</sup>

Declaration
public Output<int?> HaVmRestartTimeout { get; }
Property Value
Type Description
Output<System.Nullable<System.Int32>>
View Source

HostClusterExitTimeout

The timeout for each host maintenance mode operation when removing hosts from a cluster. The value is specified in seconds. Default: 3600 (1 hour).

Declaration
public Output<int?> HostClusterExitTimeout { get; }
Property Value
Type Description
Output<System.Nullable<System.Int32>>
View Source

HostManaged

Can be set to true if compute cluster membership will be managed through the host resource rather than the compute_cluster resource. Conflicts with: host_system_ids.

v1.18.3

Declaration
public Output<bool?> HostManaged { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

HostSystemIds

The [managed object IDs][docs-about-morefs] of the hosts to put in the cluster. Conflicts with: host_managed.

Declaration
public Output<ImmutableArray<string>> HostSystemIds { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>
View Source

Name

The name of the cluster.

Declaration
public Output<string> Name { get; }
Property Value
Type Description
Output<System.String>
View Source

ProactiveHaAutomationLevel

Determines how the host quarantine, maintenance mode, or virtual machine migration recommendations made by proactive HA are to be handled. Can be one of Automated or Manual. Default: Manual. <sup>*</sup>

Declaration
public Output<string> ProactiveHaAutomationLevel { get; }
Property Value
Type Description
Output<System.String>
View Source

ProactiveHaEnabled

Enables Proactive HA. Default: false. <sup>*</sup>

Declaration
public Output<bool?> ProactiveHaEnabled { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

ProactiveHaModerateRemediation

The configured remediation for moderately degraded hosts. Can be one of MaintenanceMode or QuarantineMode. Note that this cannot be set to MaintenanceMode when proactive_ha_severe_remediation is set to QuarantineMode. Default: QuarantineMode. <sup>*</sup>

Declaration
public Output<string> ProactiveHaModerateRemediation { get; }
Property Value
Type Description
Output<System.String>
View Source

ProactiveHaProviderIds

The list of IDs for health update providers configured for this cluster. <sup>*</sup>

Declaration
public Output<ImmutableArray<string>> ProactiveHaProviderIds { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>
View Source

ProactiveHaSevereRemediation

The configured remediation for severely degraded hosts. Can be one of MaintenanceMode or QuarantineMode. Note that this cannot be set to QuarantineMode when proactive_ha_moderate_remediation is set to MaintenanceMode. Default: QuarantineMode. <sup>*</sup>

Declaration
public Output<string> ProactiveHaSevereRemediation { get; }
Property Value
Type Description
Output<System.String>
View Source

ResourcePoolId

The managed object ID of the cluster's root resource pool.

Declaration
public Output<string> ResourcePoolId { get; }
Property Value
Type Description
Output<System.String>
View Source

Tags

The IDs of any tags to attach to this resource.

Declaration
public Output<ImmutableArray<string>> Tags { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>

Methods

View Source

Get(String, Input<String>, ComputeClusterState, CustomResourceOptions)

Get an existing ComputeCluster resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static ComputeCluster Get(string name, Input<string> id, ComputeClusterState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

ComputeClusterState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
ComputeCluster
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.