In this series of articles, I would show how to make Azure Site Recovery work with Hyper-V- step by step.
This is part 6 of the series.
Now, it’s time for actual failover. There could be planned or unplanned failover. The difference between planned and unplanned failover is that in planned failover we shut down the source virtual machine manually and start the process of failover whereas in unplanned failover we just start or power up the virtual machine on the target datacenter. Azure site recovery provides both the options to us.
In this article, we will see how the unplanned failover works.
Click on Test Failover | planned Failover menu. This should pop out a window confirming the direction of failover which in this case is from Hyper-v to Azure. It would also ask whether we want to shut down the source (hyper-v) virtual machine and synchronize the target with latest changes. Select the checkbox for shutting down the source virtual machine and synchronizing latest updates as shown below and click on the complete button.
The process of unplanned failover will start and executes a number of steps as shown below.
The source virtual machine on on-premise is shut down automatically by the azure site recovery agent.
The progress updates of the tasks should be completed. The below screen shows that failover is in progress and tasks before failover are complete.
A new Virtual machine same named as on-premise virtual machine is created in a new cloud service.
If now if we open http endpoint with port 80 on the newly created virtual machine, I should be able to browse the same start.htm file and it should still reflect my name on that page.
This shows that Azure site recovery has been able to take care of my applications and services by making them available at time of disaster recovery.
As last step for failover, we have to commit the failover by clicking on the commit button as shown below. It will ask for confirmation. Click yes for the same.
Now, if we have to failback our virtual machine back to our on-premise datacenter, we should navigate back to the virtual machine in the protection group, select it and click on Failover button.
Click on Planned failover. This is because failback are and should always be planned.
On the resultant window, the failover direction is shown. Select appropriate radio button depending upon whether you want to synchronize data before failover or during failover. We have chosen before failover and click on the complete button.
This will start the process of failback. The steps to be performed for failback are shown below.
After reaching and completing the step “Monitoring data synchronization”, it was ask us for the completion of the failover. We will go to jobs section and select the job and click on “Complete Failover” to complete the failover.
Azure hosted virtual machine DRVM would be shut down.
The failback replication would be initiated.
The on-premise virtual machine is brought back to life by switching it on. The azure Virtual machine, cloud service, Storage container and VHD blobs are deleted.
And finally the entire process should complete successfully as shown below.
With this failback, we are covered the entire circle and are back to the same situation where we started from however the difference is that a disaster happened, the virtual machine was provisioned on Azure and where the on-premise datacenter was back to life, we failed back the virtual machine on it.
Now, it’s time to look at Recovery services in Azure site recovery.
The failover we did till now were manual. We can also automate the entire process. This is where the recovery plans help us. They can orchestrate the entire recovery by orderly executing tasks in a step where each step can comprise of complex workload.
Goto Recovery Services | ProductionVault | Recovery Plans | Create Recovery Plan
Provide name, source and target as shown below.
Select the virtual machines for recovery plan and click on complete button
The end result should look like below.
We can further customize the recovery plan by attached scripts to be executed before and after shutdown of the virtual machines. We can group virtual machines as well. This is very important in scenarios where you would like to shut down domain virtual machines before shutting down active directory.
With this We conclude this series on Azure Site Recovery Hyper-V to Azure Disaster Recovery.
Hope you enjoyed the series!