VM HA Policy
HA Policy controls the automatic recovery behavior of VMs when a VM stops unexpectedly, is shut down as planned, or encounters related resource failures. Administrators can use the global HA policy, the VM HA switch, and failover policies to automatically restart critical services or migrate them to other hosts after a failure.
Core Concepts
- VM HA
- Specifies whether a VM automatically restarts after a planned or unexpected shutdown. If the platform HA policy is not enabled, turning on the VM HA switch takes effect after the platform HA policy is enabled.
- Failover policy
- Specifies whether a VM is migrated to another host and started when compute, storage, network, or other related resources of the VM fail.
Detection Items
- Management network connection status: Detects the network connection status between the host where the VM is located and the management node. A management node failure or management network interruption causes a management network connection status failure.
- Storage network connection status: Detects the network connection status between the VM and the data storage resource where its system disk is located. A failure of the data storage where the system disk is located or a storage network interruption causes a storage network connection status failure.
- Business NIC status: A failure of the host business NIC associated with the business VM or the switch port directly connected to the business NIC causes a business NIC failure for the VM.
Typical Failover Scenarios
| Typical Scenario | Management Network Connection Status | Storage Network Connection Status | Business NIC Status | Migrate on Failure? |
|---|---|---|---|---|
| Scenario A | Normal | Normal | Failure | Migrate / Do Not Migrate |
| Scenario B | Normal | Failure | Normal | Migrate / Do Not Migrate |
| Scenario C | Normal | Failure | Failure | Migrate / Do Not Migrate |
| Scenario D | Failure | Normal | Normal | Do Not Migrate |
How It Works
When a VM stops because of an unexpected condition or a planned shutdown, ZSphere checks the VM HA switch status. If the switch is turned on, the system restarts the VM on the current host or another host.
When the management network connection status, storage network connection status, or business NIC status of the host where a VM is located becomes abnormal, ZSphere checks the fault migration policy and the VM HA switch status. If the corresponding fault migration switch and the VM HA switch are both turned on, the VM is migrated to another host and started.
Configure HA Policy
Procedure
View HA Tasks
About this task
After HA Policy is enabled, HA task records are generated when the platform triggers the HA mechanism.
Procedure
Disable HA Policy
Procedure
HA Policy Practice
About this task
Assume that four business VMs are deployed on Host A to run MySQL database services. To ensure service high availability, all four VMs must be migrated to another host when the business NIC of Host A fails. In this scenario, set the HA mode of these VMs to NeverStop, configure migration to be triggered when the business NIC status fails, and ensure that sufficient host resources are available in the platform.
Procedure
Results
After the VM HA policy is configured, if the business NIC of Host A fails, the four VMs on Host A are automatically migrated to Host B and started. You can search for related task records in .
