SRM 5.8 Customizing Your Recovery Plan

SRM 5.8 Customizing Your Recovery Plan

January 8, 2015 8 By Eric Shanks

A customized recovery plan means the difference between hoursdays of reconfiguration of your environment in the event of a failure.  VMware SRM allows for lots of opportunity to customize your recovery plans with scripts and modifications along the way to ease the management of your disaster recovery plans.

Run Scripts from SRM Server

If we open any given recovery plan we can click on a step we’d like to modify and then right-click to “Add Step…”

SRM58-Customize1

 

 

 

Once we’ve added a step, we’ll be given the option to run a script from the SRM Server at the recovery site.  The name is just what will show up in the recovery plan so make it something descriptive.  The content would need to be the command to run from the SRM server at the recovery site.  Remember that this command is from windows and not a powershell command, so if you want to run powershell run the c:windowssystem32windowspowershellv1.0powershell.exe -file “path and name to script.ps1”.  In my crude example below, I’ve called a powershell script that writes some output to a file.SRM58-Customize2

Notice from the SRM server, I’ve got my “hollowOutput.ps1” script that is ready to be run.

SRM58-Customize7

Prompt

In addition to creating steps to call scripts, we can also pause the recovery plan if we need to perform some manual operations.  Add another step and choose prompt.  This will pause the recovery plan until the SRM admin clicks a button in SRM to continue the recovery plan.


SRM58-Customize4

 

Virtual Machine Options

If we click on an individual virtual machine in a recovery plan, we can also modify it’s recovery properties as well.  We can modify the priority group, which is the group of machines that will start in order of priority 1 (first) to 5 (last).  We can also set dependencies so that a VM will not start unless another VM has already been started.  We can change Startup actions so we can failover a VM but leave it off, and we can run pre power-on scripts and post power-on scripts.

Note: We also have the ability to modify IP Settings for each individual VM but this is covered in another post.

 

SRM58-Customize5

Notice that if we run a post power-on script that it can be run on the SRM server as we showed before, but we can also run the command on the virtual machine.  Perhaps some additional changes inside the guest OS need to be made to some VMs after they fail over.  SRM allows us to do that from here as well.

SRM58-Customize6

Examples

In my test recovery plan, I’ve created a script to run on the SRM Server and it successfully create a file seen below.

SRM58-Customize8

Also, notice that when I ran my recovery plan, it paused at a prompt and waited for me to click the “Dismiss” hyperlink to continue the failover.  These scripts will run during both test and failover scenarios.

SRM58-Customize9