Show / Hide Table of Contents

Class HaVmOverride

The vsphere..HaVmOverride resource can be used to add an override for vSphere HA settings on a cluster for a specific virtual machine. With this resource, one can control specific HA settings so that they are different than the cluster default, accommodating the needs of that specific virtual machine, while not affecting the rest of the cluster.

For more information on vSphere HA, see this page.

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

Example Usage

using Pulumi;
using VSphere = Pulumi.VSphere;

class MyStack : Stack
{
public MyStack()
{
    var dc = Output.Create(VSphere.GetDatacenter.InvokeAsync(new VSphere.GetDatacenterArgs
    {
        Name = "dc1",
    }));
    var datastore = dc.Apply(dc => Output.Create(VSphere.GetDatastore.InvokeAsync(new VSphere.GetDatastoreArgs
    {
        DatacenterId = dc.Id,
        Name = "datastore1",
    })));
    var cluster = dc.Apply(dc => Output.Create(VSphere.GetComputeCluster.InvokeAsync(new VSphere.GetComputeClusterArgs
    {
        DatacenterId = dc.Id,
        Name = "cluster1",
    })));
    var network = dc.Apply(dc => Output.Create(VSphere.GetNetwork.InvokeAsync(new VSphere.GetNetworkArgs
    {
        DatacenterId = dc.Id,
        Name = "network1",
    })));
    var vm = new VSphere.VirtualMachine("vm", new VSphere.VirtualMachineArgs
    {
        DatastoreId = datastore.Apply(datastore => datastore.Id),
        Disks = 
        {
            new VSphere.Inputs.VirtualMachineDiskArgs
            {
                Label = "disk0",
                Size = 20,
            },
        },
        GuestId = "other3xLinux64Guest",
        Memory = 2048,
        NetworkInterfaces = 
        {
            new VSphere.Inputs.VirtualMachineNetworkInterfaceArgs
            {
                NetworkId = network.Apply(network => network.Id),
            },
        },
        NumCpus = 2,
        ResourcePoolId = cluster.Apply(cluster => cluster.ResourcePoolId),
    });
    var haVmOverride = new VSphere.HaVmOverride("haVmOverride", new VSphere.HaVmOverrideArgs
    {
        ComputeClusterId = cluster.Apply(cluster => cluster.Id),
        HaVmRestartPriority = "highest",
        VirtualMachineId = vm.Id,
    });
}

}
Inheritance
System.Object
Resource
CustomResource
HaVmOverride
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 HaVmOverride : CustomResource

Constructors

View Source

HaVmOverride(String, HaVmOverrideArgs, CustomResourceOptions)

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

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

The unique name of the resource

HaVmOverrideArgs 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

ComputeClusterId

The managed object reference ID of the cluster to put the override in. Forces a new resource if changed.

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

HaDatastoreApdRecoveryAction

Controls the action to take on this virtual machine if an APD status on an affected datastore clears in the middle of an APD event. Can be one of useClusterDefault, none or reset. Default: useClusterDefault.

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

HaDatastoreApdResponse

Controls the action to take on this virtual machine when the cluster has detected loss to all paths to a relevant datastore. Can be one of clusterDefault, disabled, warning, restartConservative, or restartAggressive. Default: clusterDefault.

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. Use -1 to use the cluster default. Default: -1.

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

HaDatastorePdlResponse

Controls the action to take on this virtual machine when the cluster has detected a permanent device loss to a relevant datastore. Can be one of clusterDefault, disabled, warning, or restartAggressive. Default: clusterDefault.

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

HaHostIsolationResponse

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

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

HaVmFailureInterval

If a heartbeat from this 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 this 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 this 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

HaVmMonitoringUseClusterDefaults

Determines whether or not the cluster's default settings or the VM override settings specified in this resource are used for virtual machine monitoring. The default is true (use cluster defaults) - set to false to have overrides take effect.

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

HaVmRestartPriority

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

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 this virtual machine to be ready. Use -1 to specify the cluster default. Default: -1.

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

VirtualMachineId

The UUID of the virtual machine to create the override for. Forces a new resource if changed.

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

Methods

View Source

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

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

Declaration
public static HaVmOverride Get(string name, Input<string> id, HaVmOverrideState 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.

HaVmOverrideState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

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