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.
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 VMware 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 VM failover (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.
Create a vSphere HA cluster for VMware 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.
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.
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.
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 avoided completely in VM failover.
Best practices to protect VM with free backup
While VMware and Hyper-V both offer some features for data protection, there are no substantial VM backup solutions. Especially for enterprise, any accident or human-error will cause massive data loss and financial damage. So, a specialized backup software is usually used. Here, I will use a free VMware backup software - AOMEI Cyber Backup as an example. It is a centralized backup tool for VMware and Hyper-V.
With AOMEI Cyber Backup Free Edition, you can schedule automatic backups instead of manually initiating failover, and enjoy the benefits for free.
Perpetual Free: no time limit for AOMEI Cyber Backup Free Edition.
Support Free ESXi: AOMEI Cyber Backup supports both paid and free versions of VMware ESXi.
Easy-to-use: backup and restore multiple virtual machines via central console without complicated configuration and reinstallation.
Secure VM Backup: schedule VMware or Hyper-V virtual machine backups and perform hot backup to protect crucial data continuously without human errors.
Instant Disaster Recovery: instantly restore the whole virtual machine to the previous state from any selected history version.
Role-Assignment: allow one administrator to create sub-accounts with limited privilege, effectively reduce administration cost and manual errors.
Please hit the button below to download and use AOMEI Cyber Backup for free:
*You can choose to install this VM backup software on either Windows or Linux system.
Steps to use AOMEI Cyber Backup Free Edition for VM protection
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.
3. Specify the storage location as local or network.
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).
5. Click Start Backup. Then backup to the main screen, you can monitor the backup process.
6. Click Restore to original location to restore VM from backup when the original VM has been damaged.
✍ While the Free Edition covers most of the VM backup needs, you can also upgrade to Premium Edition to enjoy:
✦ Batch VM Backup: batch backup large numbers of VMs managed by vCenter Server or standalone ESXi hosts.
✦ Backup Cleanup: Specify retention policy to delete unwanted VM backups automatically, thus saving storage space and cost.
✦ Restore to new location: Easily make a clone of a virtual machine in the same or another datastore/host, without reinstalling or configuring a new VM.
To seamlessly protect a VMware environment and reduce business risk, a reliable virtual machine backup strategy is necessary.
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, virtual machine backup is also a good choice which offer consistent data protection and ensure business continuity for a long time.