During this lesson you can learn how to run a test failover on a virtual machine that has been protected using Azure Site Recovery, to ensure the recovery will proceed as expected in the case of planned or unplanned failover.
- [Instructor] Now that our virtual machines are protected, let's go ahead and run the test failover. But before we do so, I just would like to show you what ASR looks like from Hyper-V's point of view. As you can see, I'm in my server, I'm in Hyper-V. And we can see our two VMs, they're running. And what you'll need to do is select Replication and we can see here that the replication mode is primary. Replication has been enabled. The replication health is normal. The primary server, where we're replicating to, and the last time it was synchronized.
I'm going to go ahead and minimize Hyper-V Manager. Now, let's take a look at the same thing in our Recovery Services vault. And we're looking at the overview blade and there'll be a couple of things that will jump out at you immediately. And probably, the bright red part of the circle that states Critical. There's nothing to worry about here. We take a look at the replicated items. The green are the healthy replications and those are the two servers that we just configured, VM1 and VM2. The red is for a replication that has somehow failed.
And I can tell you why that's failed. Because that Azure Site Recovery service was set up on a machine that is now physically turned off. So nothing to worry about. Under Failover Test Successes, we can see that we have two that are being recommended that we test. Again, those are the two that we just configured and one has already been performed successfully. And that was the earlier system I had set up. Again, the one that is now shut down. You can see we have no configuration issues and we have one recovery plan.
Let's go ahead and take a look at those two VMs. We can quickly see both VMs are healthy and they're protected. I'm going to go ahead and select VM1. And in the overview here, we have a little bit more detail about that VM itself. Again, we can see it's healthy, it's protected. The latest recovery point objective was from one second ago. We have a crash-consistent recovery point. But we do not have an app-consistent recovery point as of yet. And that's just because I'm being a little bit impatient here and I haven't waited for that to be created.
For our failover, we can see that a test failover has not been performed and we don't have any configuration issues. If we had an errors, they'd be listed here. And if I scroll down, you will notice that we have an infrastructure overview. We have our Hyper-V virtual machine and in Azure, we have Azure Site Recovery and the storage accounts. If I click into Properties, you'll see that we have the basic information about the replication itself. Now, let's look at Compute and Network. And this is where you can modify some of the settings.
What you probably noticed was that I didn't configure a virtual machine size at all. And that's because Azure Site Recovery will pick the machine size that matches most closely to the virtual machine that we're protecting. You'll notice here that we can actually go ahead and change some of the information from our on-premise environment to Azure. In this case, I'm going to go ahead and add Test for the Azure installation. That'll just make it a little bit easier to find a little bit later. We could go ahead and change the resource group.
We're going to leave it as is. We could go ahead and change the size. If we wanted to use managed disks, we could go ahead and select that now. Next is our target virtual network. We could go ahead and leave this as is or change it as required. And the same for our target network interface type. The last bit down at the bottom here, the Hybrid Use Benefit, if you have that benefit. And with it, you can save up to 40% on your compute cost.
I'm going to go ahead and click Save. Next, let's go ahead and look at the disks. And all this does is shows you a list of the disks that are associated with that virtual machine. And you'll notice here, we only have the one disk. I did not attach any data disk to this virtual machine. Let's pop up into Overview. And from here, we can go ahead and run a test failover. Now, this is really important. You never want to know that your replication is failing when you need it most. After you've implemented and configured Azure Site Recovery, it is highly recommended that you run through a test failover.
If you're using recovery plans, you'll want to test failover with those. The setup, the test failover, is really simple. Go ahead, select Test Failover. We cannot change the failover direction. You'll go ahead and choose your recovery point and again, it'll be up to you. I'm going to go ahead and use the latest. And then, we can go ahead and select our virtual network. Now, as you recall, when we looked at the network settings for this VM, it was set on Lil-asr-vnet. But if I select that network for a test failover, we're going to have a pop-up.
It is recommended that you use a different network. And I already have one configured for that called ASRTestFO. So I'm going to go ahead and select that one and then click Okay. Your replicated VM will now be started. And in a few minutes, you'll be able to test that. The nice thing about using Azure Site Recovery is that your virtual machines have already been replicated into Azure and they just need to be started. I can see, after a few minutes, that the status has changed to Cleanup Test Failover Pending.
Let's go ahead and make sure that virtual machine is in this resource group. I'm just going to slide back to the resource group. And you will notice that we now have a virtual machine called VM1-test-test. We have a little bit of activity happening on that virtual machine. Now, the reason it's called VM1-test-test is because I added in the additional -test.
I just duplicated what was already going to happen. One thing to keep in mind when you've performed your test failover and you've logged into your virtual machine and verified everything is working, what you do not want to do is delete it from here. You actually want to go back to the Recovery Services vault. So I'm going to pop back to where we were by selecting the Recovery Service vault one more time. I'm going to select on the replicated items and this happened to be VM1.
At this point, you would actually go ahead and select Cleanup Test Failover. And this'll remove that virtual machine. Now, if there was anything in particular that you need to note about that virtual machine in the failover, this is the place to do it. You can go ahead and select Testing is Complete and this will delete that failover virtual machine. Select Okay. And that virtual machine will be deleted. After a few minutes, you'll notice your status will once again be Protected.
- Creating a Recovery Services vault for Azure Backup
- Protecting virtual machines, files and folders, databases, workloads, and file shares
- Restoring virtual machines, files and folders, databases, workloads, and file shares
- Azure Site Recovery scenarios
- Running failover and failback tests
- Replicating an Azure virtual machine