In this post, we continue with the Azure Virtual Machines Disaster Recovery feature and Failover a protected Azure VM from one region to another.
In our case, the primary VM is located in Southeast Asia, and the secondary VM is located in East Asia. We will Failover the VM from Southeast Asia (Primary) to East Asia (Secondary). East Asia will host the VM when the Failover is completed as the primary location.
Note: The process to revert the VM (Secondary to Primary) is called fallback, and we will cover it in the next post.
Failover Azure VM
To start the Failover process, make sure the Replication Health status is Healthy and Status is Protected.
If the above is correct, click on Failover to Failover the VM.
In the failover screen, confirm the failover direction and the recovery point. It is also a good idea to select to shut down the primary VM.
If the Failover were successful, you would see two VMs with the same name but different locations. In our case, the East Asia VM (which was secondary now primary) is Running, and the Southeast Asia VM (now secondary) is in a Stopped mode.
At this stage, the VM should work the same as before the Failover but will run from the East Asia region.
If you are happy with the results, it is time to commit the changes and finalize the Failover.
To commit the changes and delete all the recovery points of the VM, open the Disaster Recovery page and confirm that the status is Failover completed.
Click on Commit.
After committing the changes, confirm that the status is Failover committed.
The final step in the failover process is to re-protecting the VM and replicate the VM from the primary region (formally secondary) to the secondary region ( formally primary).
To re-protect the VM and start replication, click on the Re protect button.
Confirm all the details and click OK. You can monitor the replication status from the notification bar.
After the process is completed you can check the health of the VM and status from the Disaster Reocvery page.
In the next post, we will Failback the VM back to its original primary site (Southeast Asia).