By Crystal / Last Updated April 6, 2022

What is VM failover and how it works

VM Failover is a process to transfer the original VM from the source site to the target site. It allows the VM replica at the disaster recovery site to take over the business workloads of the primary VM when it corrupts.

VM failover provides an immediate disaster recovery solution to improve the high availability of virtual machines, which reduces the downtime of service and ensures business continuity.

3 types of VM failover

Generally, there are 3 types of failover such as Planned failover, Test failover and Regular failover.

Planned failover: It is commonly used for moving workloads from primary site to secondary site in the case of datacenter migration, maintenance or application upgrade.

Test failover: It is a technique to validate if the recovery plan can run smoothly when the failover is performed.

Unplanned failover: It is performed when an unexpected event happens such as natural disaster, virus attract, power outage and so on.

what is vm failover

How to perform VM failover in VMware and Hyper-V

How do you implement virtual machines failover? Virtual machine replicas or failover clusters are both practical and feasible.

Clustering achieves high availability of virtual machines by setting up failover between several hosts or nodes and automates virtual machine failover without any disruption and data-loss. Meanwhile, VM replication is also an efficient solution for fast disaster recovery using RPO, and it is possible to recover virtual machine to a remote site.

In Hyper-V environment, it offers a Failover Cluster and Hyper-V replica between several Hyper-V hosts. Hyper-V replica is to create a copy of the primary VM and transfer data to the secondary site. Hyper-V failover clustering is a connected unit of independent computers. When a physical server in the cluster fails, another server begins to enable Hyper-V VM failover to take over the services.

For VMware environment, the VMware High Availability cluster and vSphere Replication are available for VM failover.

For detailed introduction about Hyper-V VM failover, you can refer to Hyper-V clustering. In the following part, I will mainly introduce how to achieve VM failover in VMware High Availability (VMware HA) cluster.

How to configure vSphere High Availability Cluster

A vSphere HA cluster is made of a number of ESXi hosts administered collectively by vCenter Server. In VMware HA cluster, it includes a master host used to monitor the other hosts and the virtual machines from network heartbeats. Once a host fails, another host will take over the services immediately and perform virtual machine failover.

vmware HA cluster

Create a vSphere HA cluster for VM failover step by step

vSphere High Availability cluster only supports ESXi 6.0 or later version. This part will introduce the detailed steps to create an efficient vSphere High Availability cluster. Before configuring vSphere HA cluster, you should re-enable disaster recovery site (DRS) first.

1. Log in vSphere Web Client. Then navigate to Datacenters, then click Create a cluster.

2. In the wizard, enter a name for new cluster and select Turn ON DRS and vSphere HA.

3. In vSphere HA wizard, select Enable Host Monitoring. It allows vSphere HA to detect any host failure and take actions.

4. If you select Enable admission control, you should choose a policy for how it is enforced such as Host failures cluster tolerates policy, then specify the number of reserved hosts and Cover all power-on virtual machines as Slot size policy.

Tips: Percentage of cluster resource reserved policy does not address resource fragmentation, so it means there is no guarantee that your cluster won’t experience resource fragmentation.

Eable admission control

5. Select VM Monitoring Status as Disabled / VM Monitoring Only / VM Application Monitoring. For example, select VM Monitoring Only to restart individual virtual machines if their heartbeats are not received within a set time.

6. Select VM restart priority as Disabled / Low / Medium / High, and specify Host Isolation response as Leave powered on / Shutdown and failover / Power off and failover.

select VM restart priority

7. For Data Heartbeating, specify the datastore to monitor hosts and VMs when the management network has failed such as Select only from my preferred datastore / Select any of the cluster datastores / Select any of the cluster datastore taking into account my preference. Then choose preferences for the datastores in the box below.

Add hosts and VMs to cluster

1. Right click the cluster and click Configuration >> Quickstart >> Add Host.

add host into vmware cluster

2. Type the name and IP address of the host. Then enter the root username and password for the host.

3. Review the Host summary.

4. Assign a license key to the host that already exists in vCenter Server license inventory or add a new license key.

5. Select Enable lockdown mode to prevent remote access from to this host, or keep it unable.

6. Review the settings and click Finish.

After finishing configuration, you can back to the main screen to check if the host and its virtual machines are added into the cluster successfully.

With failover, is it still necessary to backup VMs

To achieve more secure data protection without complicated configurations, you can choose VM backup and recovery. It doesn’t require shared storage and complex configuration for failover cluster. At the same time, replica and cluster needs more space for VM failover which means it causes resource-wasting of virtual machine.

So, even though you configured VM failover cluster, I still recommend you to use backup to protect your virtual machines in case of system damaged or virus attract that cannot be avoid completely in VM failover.

Best practices to use backup for VM protection

While VMware and Hyper-V both offer some features for data protection, there is no substantial VM backup solutions. Especially for enterprise, any accident or human-error will cause massive data loss and fanancial damage. So, a specialized backup software is usually used. Here, I will use AOMEI Cyber Backup as an example. It is a centralized backup tool for VMware and Hyper-V.

With ACB, you can schedule automatic backups instead of manually initiating failover, and it is easy to operate more secure backup through centralized console. To avoid wasting storage, it provides retention policy and flexible backup strategies for VM protection.

Download Free TrialVMware ESXi 6.0 & later versions
Secure Download

Steps to use AOMEI Cyber Backup

1. In AOMEI Cyber Backup main screen, navigate to Backup Task >> Create New Task.

2. In the open wizard, type backup name and select device and its virtual machines for backup.

select VM backup

3. Specify the storage location as local or network.

backup location

4. In Schedule section, select full backup for entire VM or incremental/differential backup for only changed data. Then specify the time to run the task such as daily/weekly/monthly (by data) /monthly (by week).

schedule backup

5. In Backup Cleanup section, select VM backup retention policy to delete the unwanted files automatically for saving storage.

backup cleanup

6. Click Start Backup. Then backup to the main screen, you can monitor the backup process.

monitor backup process

7. Click Restore to recover the virtual machines when the origianl VM has been damaged. There are 2 options for you to restore the VM to orignal place or to another host that allows you perform data migration easily and quickly.

restore VM to antoher host

To seamlessly protect a VMware environment and reduce business risk, a reliable virtual machine backup strategy is necessary.

Summary

This article explains how to achieve VM failover and configure vSphere High Availability step by step. No matter you want Hyper-V VM failover or VMware VM failover, replicas and failover cluster are both efficient for you to protect your virtual machines and business.

Besides VM failover, in older to protect your virtual machine comprehensively, backup is also a good choice which offer consistent data protection and ensure business continuity for a long time.