Business continuity is a critical part for every company. If you are a sysadmin, you must prevent planned maintenance and unplanned outages. In Azure, you can easily implement a recovery strategy thanks to Azure Site Recovery.
In this article, we will replicate an Azure VM to another Azure Region using Disaster Recovery.
Getting Started
Let’s start by opening the Azure portal and create a new Virtual Machine. This VM will be named VMSource located in France. Then, I will replicate this Virtual Machine in UK.
I created a new Virtual Network + Subnet and I attached a new public IP.
Then, I created a resource group named “TargetRG” to organize the replicated resources in UK South.
I also created a Virtual Network named “Target”
After creating the source VM and the destination resource group, I tested the RDP connection to the source VM. I also created a simple txt file to confirm the status of the VM after replicating it.
Then, I enabled the disaster recovery feature :
- Open the Virtual Machines blade
- Click on the source VM
- Go to “disaster recovery” tab
- Select the target region (in my case UK South)
Then, I configured the « Advanced settings” with the target information.
- Subscription
- Resource group
- Virtual Network
Below is the review
You can also see the replication settings
A few minutes later, you will see many recovery jobs :
- To create the replication policy
- Create the sites
- Create the protection containers
- Map networks
- Enable replication
Here is the architecture schema of your recovery plan.
- On the left: the source infrastructure
- On the right: the destination infrastructure
The first recovery point has been created a few minutes later
In the essentials section, all the information describe the replication status
To test the failover, I clicked on “Test Failover”
In the new blade that appeared, I selected the target Azure Virtual Network
After a few minutes, the test was operational
You should see a new “test” VM in the virtual machines blade
I attached a new public IP address to validate the RDP:
After connecting to the destination VM, I was able to confirm the txt file that I created at the beginning.
At the end of the test, I clicked “Cleanup test failover” to delete all the test resources
Azure asked me for a note before deleting the resources.
Now, Azure shows the VM status as “Protected” and the last successful test failover.