In this lesson you can learn how to create a recovery plan that can be used group virtual machines together that can then be started and stopped together, and add a script or a manual action to the virtual machines.
- [Instructor] When you're using Azure Site Recovery to protect groups of virtual machines, you may want to consider creating a recovery plan. A recovery plan will let you group machines together to failover together and then to start together. You can also use a recovery plan to bring up specific machines before others. For example, you may want your back-end infrastructure machines up and running before your front-end servers. Let's go ahead and create a recovery plan. Go ahead and click on Step two from under For on-premises machines and Azure VMs, and you'll find this under Getting Started, and then Site Recovery.
We can go ahead and simply click on Create a recover plan, provide a name. I'm going to use RP1. You'll want to use a descriptive name, for example, Line of Business Applications. Go ahead select your source. Now the source will be the HyperVSite that you created. And in this demonstration, we're using HyperVVm1. Now we can go ahead and select that deployment model. Again, you should be in Resource Manager. And finally, select the items or the virtual machines that you want included in this plan.
I'm going to include VM1 and VM2, and click OK. And then you can go ahead and click OK again. And this will take a moment to create. Our recovery plan has now been completed, and we can go ahead and take a look at it. What you'll want to focus in on here is the customization option. And then go ahead, click Customize. And you'll notice now we have the various stages and the details about those stages.
So in our first stage, we have all groups shut down. And that will be the two machines in that one group. And then all groups will failover. In our example, VM1 and VM2 will failover together. The next stage is the start stage. In this example, we have VM1 and VM2 starting together, but I could go ahead, if I wanted to do so, delete VM2 from that group one, and I could add another group, and then add in VM2 here.
Let's go back to group one, start. And let's say I'd like to add in a post action. So VM1 will start, and then another action needs to be taken. I'm going to go ahead and add a post action. I have two options here, I can use a script, or I can do a manual action. For a script, you need to have an Azure Automation Account already configured for this. It's a great option, and basically what will happen is the Automation Account will have a run book which will then have the automated steps that need to be performed on that VM.
As I don't have an Automation Account ready to go, I'm going to go ahead and do a manual action. And this isn't quite what you think it is. So I'll provide a name. In Action instructions, you would just add in what needed to be done. And this would have to be manually done by the operator. Next we can select when this action would have to be done. Does it have to be done during a test failover, a planned failover or just on a failover.
I'm going to have them all selected here, and then go ahead and click OK. And I can go ahead and add in another post or pre-action to any other groups. Once you've configured everything, you'd go ahead and click on Save. It'll take a few moments for your recovery plan to be updated, as ours is now. And the last thing that I want to point out here is the Test failover. So you can actually go ahead, run the test failover from the recovery plan.
This enables you to ensure that that recovery plan is working the way it's supposed to work. And that's all there is to it to create a recover plan where you can customize the failover and the start-up of your virtual machines.
- 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