‘Azure’ site recovery by on-premises Hyper-V VMs replication
There are many ways in which we can set up an Azure based site recovery. I am explaining the steps involved in setting up Azure site recovery by on-premises Hyper-V VMs replication
- Recovery Service Vault: Sign in to the Azure portal and create a ‘Recovery Service Vault’ (Inputs are Preferred Name, Subscription Name, Resource Group name and Location)
- Prepare Infrastructure: Open the object created. Open ‘Site Recovery’ page and select ‘Prepare Infrastructure’ as below:
As the next step, do an evaluation of the deployment infrastructure (Site Recovery performs optimally when sufficient network bandwidth and storage are provisioned. Allocating insufficient capacity can lead to replication issues.). You may refer the following link for more details
Azure Site Recovery Deployment Planner
3. Prepare the Hyper-V source: Now, we are going to prepare the source. On the prepare source page, click the + sign next to ‘Hyper-V Site’, give a preferred name and press OK
Now, the Hyper-V server option will be enabled and click it to add the server. Then the options are shown as below:
In your Hyper-V server, download and install the installer for the site recovery (link shown in the same window. Also download the vault registration key from the page.
So, once the source is ready, you can see the prepare source page as below:
Note: I have stroked out the name of the site in the below image. You can see the name also in this page.
4. Prepare Target: In target preparation step, you need to create a storage account and Network. If the two resources are already available in your Azure infrastructure, the page will show as below. You may create your own from the page too.
Note: Make sure that you are creating a Resource Manager storage and Network (Not the classic one). Otherwise, you will end up with connectivity issues between storage and network.
5. Create and Associate a Replication Policy: This is the final step of your infrastructure preparation.
Enter the policy name.
In RPO threshold, use the default of 60 minutes. This value defines how often recovery points are created.
In Recovery point retention, specify how longer each recovery point is retained. Replicated VMs can be recovered to any point in a retention window.
In App-consistent snapshot frequency, specify how often app-consistent snapshots are created.
6. Replicate Application: Now we are ready to replicate the VMs to Azure. Go to Site Recovery->Step1: Replicate Application. Source, Target, are already setup and proceed to the Virtual Machines page as below:
There were 6 VMs contained in my Hyper-V infrastructure (Names are stroked out). Select the desired VM to be replicated from the list
Configure Properties of the VM selected: Make sure that you follow this step carefully. In this page, basically you are going to select the disks to be migrated. OS disk should be selected carefully after referring the exact disk at your Hyper-V Vm.
In Replication settings > Configure replication settings, verify that the correct replication policy is selected.
Select Enable Replication to start the replication
You can track progress of the Enable Protection job in Settings > Jobs > Site Recovery Jobs.
After the Finalize Protection job runs, the machine is ready for failover.
It can take 15 minutes or longer for changes to take effect and appear in the portal.
To monitor VMs you add, check the last discovered time for VMs in Configuration Servers > Last Contact At. To add VMs without waiting for the scheduled discovery, highlight the configuration server (don’t select it) and select Refresh.
You can see the status similar to the below image
7. Test Failover : Once the replication status turned to healthy, you can try a Test Failover. Test Failover creates the VM in your azure infrastructure
In this page, Select the recovery point. You will need to select an appropriate network Azure prefer a new network than the one which we used for the replication.
Track failover progress on the Jobs tab. You should be able to see the test replica machine in the Azure portal. Usually with the name as Test-yourvmname.
To initiate an RDP connection to the Azure VM, add a public ip to the etwork interface of the failed over VM.
Once the VM is up and running, make sure that all the disks are online. If not, go to the disk manager and change the disk status from ‘offline’ to ‘online’ to see all your disks in the VM.
When everything is working as expected, click Cleanup test failover. This deletes the VMs that were created during test failover.
Run a failover
You can run the failover for the virtual machine from the Replicated items page. Select Recovery Plans > recoveryplan_name. Click Failover. select a Recovery Point to failover to.
You can follow the failover progress on the Jobs page. The time taken for the failover is lower. In certain cases, failover of virtual machines requires an extra intermediate step that usually takes around 8 to 10 minutes to complete.
After the failover, validate the virtual machine by logging-in to it.
Once you are satisfied with the failed over virtual machine, you can Commit the failover. Commit deletes all the recovery points available with the service and Change recovery point option is no longer available.
Once the VM is up and running, make sure that all the disks are online. If not, go to the disk manager and change the disk status from ‘offline’ to ‘online’ to see all your disks in the VM.
No responses yet