saltext.vmware.modules.cluster_ha#
- saltext.vmware.modules.cluster_ha.configure(cluster, datacenter, enable=False, host_monitoring='enabled', vm_monitoring='vmMonitoringDisabled', vm_component_protecting='disabled', vm_min_up_time=120, vm_max_failure_window=- 1, vm_max_failures=3, vm_failure_interval=30, isolation_response='powerOff', restart_priority='medium', restart_priority_timeout=120, enable_apd_timeout_for_hosts=False, vm_reaction_on_apd_cleared='none', vm_storage_protection_for_apd='warning', vm_storage_protection_for_pdl='warning', vm_terminate_delay_for_apd_sec=180, admission_control_policy=None, advanced_options=None, service_instance=None)[source]#
Configure HA for a given cluster
Supported proxies: esxcluster
- cluster
The cluster name
- datacenter
The datacenter name to which the cluster belongs
- enable
Enable HA for the cluster
- host_monitoring
Determines whether HA restarts virtual machines after a host fails. Valid values - enabled, disabled. Default - enabled.
- vm_monitoring
Specifies the level of HA Virtual Machine Health Monitoring Service. Valid values - vmAndAppMonitoring, vmMonitoringDisabled and vmMonitoringOnly. Default - vmMonitoringDisabled.
- vm_component_protecting
Indicates if vSphere HA VM Component Protection service is enabled. Valid values - enabled, disabled. Default - disabled.
- vm_min_up_time
The number of seconds for the virtual machine’s heartbeats to stabilize after the virtual machine has been powered on. This time should include the guest operating system boot-up time. The virtual machine monitoring will begin only after this period. Default - 120 seconds.
- vm_max_failure_window
The number of seconds for the window during which up to maxFailures resets can occur before automated responses stop. If set to -1, no failure window is specified. Default -1.
- vm_max_failures
Maximum number of failures and automated resets allowed during the time that maxFailureWindow specifies. If maxFailureWindow is -1 (no window), this represents the absolute number of failures after which automated response is stopped. If a virtual machine exceeds this threshold, in-depth problem analysis is usually needed. The default value is 3.
- vm_failure_interval
If no heartbeat has been received for at least the specified number of seconds, the virtual machine is declared as failed. The default value is 30.
- isolation_response
Indicates whether or not the virtual machine should be powered off if a host determines that it is isolated from the rest of the compute resource. If not specified at either the cluster level or the virtual machine level, this will default to powerOff.
- restart_priority
Restart priority for a virtual machine. If not specified at either the cluster level or the virtual machine level, this will default to medium.
- restart_priority_timeout
This setting is used to specify a maximum time the lower priority VMs should wait for the higher priority VMs to be ready. If the higher priority Vms are not ready by this time, then the lower priority VMs are restarted irrespective of the VM ready state. This timeout can be used to prevent the failover of lower priority VMs to be stuck infinitely. Default - 120
- enable_apd_timeout_for_hosts
This property indicates if APD timeout will be enabled for all the hosts in the cluster when vSphere HA is configured. Default - False
- vm_reaction_on_apd_cleared
Action taken by VM Component Protection service for a powered on VM when APD condition clears after APD timeout. Default - none
- vm_storage_protection_for_apd
VM storage protection setting for storage failures categorized as All Paths Down (APD). Valid values - disabled, warning, restartConservative, restartAggressive, clusterDefault. Default - warning
- vm_storage_protection_for_pdl
VM storage protection setting for storage failures categorized as Permenant Device Loss (PDL). Valid values - disabled, warning, restartConservative, restartAggressive, clusterDefault. Default - warning
- vm_terminate_delay_for_apd_sec
The time interval after an APD timeout has been declared and before VM Component Protection service will terminate the VM. Default 180 seconds.
- admission_control_policy
Specify the admission control policy for the cluster as a dictionary.
{ "slot_based_admission_control": { "failover_level": 1, "resource_reduction_to_tolerate_percent": 20 } } { "failover_host_admission_control": { "failover_level": 10, "resource_reduction_to_tolerate_percent": 30, "failover_hosts": ["host1", "host2"] } } { "reservation_based_admission_control": { "failover_level": 22, "resource_reduction_to_tolerate_percent": 33, "autocompute_percentages": false, "cpu_failover_resources_percent": 45, "memory_failover_resources_percent": 56 } }
- advanced_settings
Advanced options for the cluster, to be passed in as a dictionary.
CLI Example:
salt '*' vmware_cluster_ha.configure cluster1 dc1 enable=True
- saltext.vmware.modules.cluster_ha.get(cluster_name, datacenter_name, service_instance=None)[source]#
Get HA info about a cluster in a datacenter
- cluster_name
The cluster name
- datacenter_name
The datacenter name to which the cluster belongs
- service_instance
Use this vCenter service connection instance instead of creating a new one. (optional).
CLI Example:
salt '*' vmware_cluster_ha.get cluster_name=cl1 datacenter_name=dc1