A useful feature added in the last Nakivo Backup & Replication 7.4, is the capability to perform an automated VM failover that gives you the option to select which replica to fire up.
An additional level of automation is also provided with the Networks Mapping and Re-IP rules capabilities used for reconfiguring VM networking if the DR site uses a different network configuration compared to production site.
Create a replica
Since failover requires the availability of existing VM replicas, follow this procedure to configure replication in Nakivo. Latest version of Nakivo provides the Network Mapping and Re-IP features also in the replication wizard.
Create an automated VM failover job
To take benefit of the automated VM failover capability, you need to create the failover job for the replicated VM first. From the Nakivo's dashboard select Recover > VM failover to replica option in the main menu.
Select the replicated VM and the recovery point to use then click Next.
If source and DR networks are different, check the Enable Netwok mapping option to create a relation between these networks. Click Create new mapping to create a new one.
Specify Source and Target networks then click Save.
If you have a previously saved network mapping, click Add existing mapping to specify the already configured map to use.
The Network Mapping has been configured. Click Next.
If the source VM subnet differs from the DR subnet used for the target replica, you need to configure a Re-IP rule in order to establish a relation between the two subnets. Check the Enable Re-IP option and click Create a new rule. Specify both source and target settings then click Save. Wildcards are supported in the IP address configuration (i.e. 192.168.10.*).
Click Add existing rule if you have already saved some rules.
When Re-IP has been configured, click Next.
Enter a Job name and leave Power off source VMs option enabled to avoid issues. Click Finish to save the configuration.
The failover job has been created successfully.
Perform VM failover
If your production virtual machine fails for any reason, you can nearly-instantaneously switch to its replica through the automated failover feature. To run the failover, from the Nakivo's dashboard right click the failover job and select Run Job.
Specify the Run job scope and click Run to execute the failover.
The failover is being performed.
When failover process has been completed successfully (run time of course depends on the used equipment and infrastructure), the replicated VM is active and takes over the primary role.
Checking the vSphere Web Client, you can notice the production VM is powered off while the replica is running.
During the failover process, the reply from VM ping is first given from the source IP address.
When Re-IP rules have been applied, ping reply comes from the new remapped IP address in the DR site.
Failback to production
Regardless if the failed VM at the primary site is restored or not, when you perform the failback to return workloads to the primary site two scenarios have to be considered:
- Discard changes - changes in the recovered VM can be discarded
- Commit changes - changes occurred in the recovered VM from replica have to be committed and moved to production
The detailed procedure can be found in this post.
If you don't want to keep changed data on the recovered VM, from vSphere Web Client right click the active replica and select Power> Shut Down Guest OS option.
If you need to move all changes back to production VM, you can replicate the recovered VM to production.
Create a new replication job for the VM that you want to permanently recover and, in the Destination tab, check the Use existing target VM option as Target. This will transfer all changes to the VM in production.
When the failback procedure has completed, the VM replicated to production is up and running with all changes occurred during the failover time.