Azure Site Recovery (ASR) Tutorial [Step-by-Step]

Sahil Hulage


Overview on Azure Site Recovery

ASR is not a backup solution but a disaster recovery (DR) site in the cloud. Having a DR site was never easier and never cheaper than having one in Azure. Most traditional DR sites involve equipment identical (or at least very similar) to the site that is protected, and cost around 80% of price of the original site. On the other hand, ASR is charged per protected node and for storage where data is stored, so comes very cheap. If recovery is activated in Azure, then compute prices is added for VMs. This way you are paying only for protection and compute prices only when failover occurs. If we create an on-premises DR site, we must pay for the hardware needed to run DR even when failover isn't in place but only used as protection.


In this article, we are showing how to set up disaster recovery of Azure VMs from a primary region to a secondary region.

You can refer to the below architecture for reference to understand how it works. And VM only gets created once failover is done.

Azure Site Recovery (ASR) Tutorial [Step-by-Step]


  • Azure Site Recovery
  • VM Running on Azure
  • Basic Knowledge of Azure fundamentals


Step 01: - Deploy Azure Site Recovery Service

As usual, We will deploy one resource in our Azure Subscription. This time will deploy Azure Site Recovery which is a service we use for Backup, Business Continuity Plans, and Disaster recovery.

First search for Azure Site Recovery in Subscription.

Azure Site Recovery (ASR) Explained [Step-by-Step]


Next, We have to fill a few simple fields in the resource create wizard. Most of it is Self-Explanatory.

Azure Site Recovery (ASR) Explained [Step-by-Step]


Next, Azure will validate the values and then hit Review + Create.

Azure Site Recovery (ASR) Explained [Step-by-Step]


Step 02: - Configure Azure Site Recovery (ASR) for Azure VM

Once ASR is deployed we can see this overview page and here we have options to Protect your infrastructure for Disaster Recovery.

We will use Enable Replication option for Azure Virtual Machine which will Replicate Azure VM from one Azure region to another. So, In case the primary region went down then our workload of Azure VM would be replicated on the destination region.

Azure Site Recovery (ASR) Explained [Step-by-Step]


First, we have to select the source. Then we will select Azure VM to replicate from Central India to another region.

Azure Site Recovery (ASR) Explained [Step-by-Step]


In the Virtual Machine tab, We can list VM's running in our Source Location, and here we can select which VM we want to include in our DR plan. And that VM should be in a running state while configuring the ASR.

Azure Site Recovery (ASR) Explained [Step-by-Step]


In the third tab, We have Replication Settings and here we can configure Target Location, Target Subscription, and Resource Group, Network, Storage, and Availability option.

In-Network you can create the same identical IP Range and Subnet so when you have an actual issue it can use the same IP Range for VM.

It's like the same Target Resource Group and Target Virtual Network.

Azure Site Recovery (ASR) Explained [Step-by-Step]


Cache Storage Account can be used only when initially we use it for replicating VM's DISK for caching purposes only. and other options are self-explanatory to understand if you have basic azure knowledge.

Recovery Policy:-  How to configure and set retention policy.

Recovery point retention:- Specify (in hours) the duration of the retention window for each recovery point. Protected machines can be recovered to any point within a retention window. Up to 24 hours of retention is supported for machines replicated to premium storage. Up to 72 hours is supported for standard storage.

Azure Site Recovery (ASR) Explained [Step-by-Step]


Once everything is followed as expected then we can see our VM here is replicated items tab in ASR.  It will take some time to sync your disks and replicate.

Azure Site Recovery (ASR) Explained [Step-by-Step]


When you click on VM you can see its Replication Health and it's showing Healthy. In Status, you can see synchronization and it will take time to sync the disks as per the size of disk and bandwidth.

Azure Site Recovery (ASR) Explained [Step-by-Step]


Once you see the status is protected you can see RPO. Later you can also do a Test Failover.

Azure Site Recovery (ASR) Explained [Step-by-Step]


Step 03: - Test Azure Site Recovery Failover

So, our next step is to verify whatever we have configured is working correctly. It's part to do a drill to check and verify that our workflow is working as expected. It should not be the scenario in the actual situation where our primary region is facing an outage issue and failover is not working as expected so we will manually simulate this scenario.

For this, We have a provision to do a Test Failover.

Azure Site Recovery (ASR) Explained [Step-by-Step]


In the above image, you can see the Failover Direction where From contains the source while To contains the destination regions. And latest recovery points are the latest backup taken by your ASR.  Azure Virtual Network which you can use to provide the required IP range and hit the OK button. Then it will start creating resources in destination regions.

Once it's done you can see VM created in the West US. After deployment you can add a new Public IP address to your virtual machine and point your DNS to that virtual machine.

Azure Site Recovery (ASR) Explained [Step-by-Step]


You can see the resource group here created by Azure Site Recovery.

Azure Site Recovery (ASR) Explained [Step-by-Step]


Step 04: - Clean up the resources

Now our Test Failover is done we can clean up the resources. For this we can use the Cleanup test failover option it will delete everything which has been created by Azure Site Recovery while testing failover.

Azure Site Recovery (ASR) Explained [Step-by-Step]


Then here you can commit that testing has been completed and it will confirm and delete the resources.

Azure Site Recovery (ASR) Explained [Step-by-Step]


Yes and using this way we can configure the Disaster Recovery Solution in Azure for replicate Azure VM and can test it successfully for DR drills and productions also.



So, using Azure Site Recovery helps us to manage and set up a business continuity plan and disaster recovery. It is an easy way to configure and monitor your recovery.


Reference Link


Views: 132

Sahil Hulage

He possesses over 5 years of experience as a Cloud Consultant, specializing in Azure DevOps and CloudLinux. With his expertise, he implements and optimizes cloud solutions, ensuring seamless operations and efficient resource management. You can connect with him on LinkedIn.

Can't find what you're searching for? Let us assist you.

Enter your query below, and we'll provide instant results tailored to your needs.

If my articles on GoLinuxCloud has helped you, kindly consider buying me a coffee as a token of appreciation.

Buy GoLinuxCloud a Coffee

For any other feedbacks or questions you can send mail to

Thank You for your support!!

Leave a Comment

GoLinuxCloud Logo

We try to offer easy-to-follow guides and tips on various topics such as Linux, Cloud Computing, Programming Languages, Ethical Hacking and much more.

Programming Languages