Azure Site Recovery (ASR) provides a reliable solution for disaster recovery of virtual machines (VMs) in the cloud or On Prem. With ASR, we can replicate our on-premises or Azure VMs to a secondary Azure region, ensuring business continuity and minimizing downtime in case of a disaster. ASR offers continuous replication, allowing changes made to the primary VMs to be replicated to the secondary VMs in real-time. In the event of an outage or disaster, we can initiate a failover which will switch to the replicated Resources in the secondary region. By implementing Azure Site Recovery for VMs in the cloud or On Premises, we can enhance the resilience of our infrastructure, protect critical workloads, and handle unexpected disruptions.
When implementing Azure Site Recovery (ASR) for an Azure VM in the cloud, Microsoft recommends following a four-step process to ensure a successful setup and effective disaster recovery:
- Enable Replication
- Run a disaster recovery drill
- Run failover and Reprotect
- Run Failback
Following this four-step process helps ensure a comprehensive and tested disaster recovery solution for the Infrastrucutre. It allows you to establish replication, validate recovery readiness, execute failover, reprotect the environment, and successfully perform failback when the primary region is restored, all while maintaining business continuity and minimizing downtime.
The resources utilized for implementing this project include the following:
- Recovery Vault Service
- Azure Site Recovery
- Storage Accounts
- Virtual Machines
- Virtual Network
- Availibilty Set
- Creating a Virtual Machine called VM1 in the ‘eastus’ region.
- Created an Availability Set (AS-1) across 3 Fault Domains and 3 Update Domains.
The basic details of the VM are as follows:
- Virtual Network, VNET-1 with a CIDR range of 10.0.0.0/16
- the subnet-1 has a CIDR range of 10.0.1.0/24.
-
To enable the Azure Site Recovery, I need to deploy the Recovery Services Vault services in a region which is not in the East US (as the Primary Site has been deployed in the East US region).
-
Created a Recovery Services Vault called ‘ASR’ in the West US region.
- Here, in the ASR Recovery Services Vault, I will enable the ‘Enable Site Recovery’ Option, after that I will start the first process i.e., Replication Process for the Azure Virtual Machine.
- Enabled the replication for the Azure VM in the West US region. This will create the following resources in the West US region for replication.
- The VM-1 has been replicated.
- A New Resource group has been automatically created with the Name of region-1-asr.
- It has the Availability Set, VM Manged Disk and the Virtual Network.
- In the Vault-RG, there is Cache Storage Account created. This Cache Storage Account will store all the data from the VM-1 disk.
- The infrastructure view of the replication process of the VM-1.
- Taking a Test Failover of the VM in the East US to the West US. The Virtual Network will be VNET-1-asr.
- New VM-1 was created in the West US region and the VM in the East US region has been stopped.
- The Test Failover was completed successfully. Now, failing over the Services to backup.
- After failover and committing the failover. The services are running from the West US region.
- Re-protecting the site. A cache storage in the Secondary site which will replicate to the managed disk on the Primary disk, this is done so that if any changes are made during the failover, the changes will be replicated on the Cache Storage account which In turn will replicate on the Managed disk on the Primary.
- Cache Storage Account Created in the West US Region as well.
- Managed Disk in the East US region
- Infrastructure after the Failover and Reprotecting
- After the synchronization, I will take failback to the primary site – East US.
- The synchronization is complete, the services is running in the West US region.
- After the Failover is completed, I have committed to the failover. Now, re-protecting the primary site by replicating the Disk Data to the Secondary site. This will ensure any changes made to the primary is replicated in the Secondary as well.
- The VM is running in the Primary Site.
In conclusion, implementing Azure Site Recovery (ASR) for Azure VMs in the cloud provides a reliable and robust solution for disaster recovery. By following the recommended four-step process of enabling replication, conducting a disaster recovery drill, executing failover and reprotect, and performing failback, organizations can establish a comprehensive and tested disaster recovery strategy. ASR ensures business continuity, minimizes downtime, and enhances infrastructure resilience by replicating VMs to a secondary Azure region