SRM 5.8 now with Automation!
January 19, 2015SRM version 5.8 now is now extensible with vRealize Orchestrator (formerly vCenter Orchestrator). This new functionality was expected since the vRealize Suite is all about automation and disaster recovery certainly needs to be taken into consideration.
One pain point I’ve seen with SRM has been the ongoing administration of protection groups. Every time a virtual machine is deployed to a protected datastore, the VM also has to be configured for protection. This usually only consists of right clicking the virtual machine and choosing “configure protection” but is also another thing that administrators have too keep track of.
Thanks to some new vRealize Orchestrator Plugins, we can automate this process so we don’t have to think about it anymore. First, be sure to import the SRM plugins for vRealize Orchestrator. Download the plugins here. Then import the plugin to vRO. The vCenter Orchestrator Plug-In Release Notes has all the details about importing the plugin.
Schedule a vRealize Orchestrator Job
The first option is to schedule a vRealize Orchestrator (vRO) job to go out and protect virtual machines. The “Protect All Unprotected Virtual Machines Associated with Protection Group” workflow should take care of your issue and vRO is free with vSphere so this might work great for you.
To schedule a workflow, right click on the workflow and choose “Schedule workflow…”
Fill out the information and set your recurrence.
vRealize Automation Server Provisioning
The other method, you might see is enabling vRealize Automation (Formerly vCloud Automation Center) to automatically protect a virtual machine as a new request is made. To do this, I created a virtual machine blueprint in vRealize Automation (vRA) that calls an Orchestrator workflow to then protect the VM.
Once the resource is requested, it calls my custom vRO workflow as part of the ExternalWFStubs.MachineProvisioned workflow. If you’re not familiar with vRA stubs, this allows you to call a workflow after a virtual machine has been provisioned.
The workflow looks like this, and will only protect the single virtual machine that was just requested from the vRA portal. You can obviously do much more with this, such as have the virtual machine put into a custom recovery plan(s) or create new protection groups and recovery plans at the time of provisioning. The workflow below is a simple way to configure a virtual machine that has already been deployed on replicated storage.
The deployment options could get very fancy, by allowing a user to select “protected” or “unprotected” and things if you want to spend the time to give these options to the users.
There is also a default workflow added to vRealize Orchestrator when you add the SRM Plugins that you could use as well, so don’t think you need to be a vRO expert to do these things.
Summary
It seems almost everything we do with our infrastructure these days needs to have some automation tools to go along with it. I’m very excited that VMware Site Recovery Manager 5.8 has some additional plugins for the vRealize Suite to manage deployments as well. The ways you can manage your disaster recovery solution are now greatly augmented so that you can build the solution that you need.
Hi Eric. I am still on the long path to learning vRO and currently getting my head around vRA 7. Would you be willing to share this protection workflow so that I can learn from it (I have being doing a LOT of JS the past few weeks so should be able to understand the code used)? Thanks, Gavin
The SRM plugin is freely available from VMware, so you can download and install it. As far as understanding the hand offs between vRA and vRO, take a look at this which hopefully explains that process a bit. https://theithollow.com/2016/02/08/vrealize-automation-7-subscription/
Hi Eric,
great article, was just wondering though, where you mention that the new VM can then be put into a custom recovery plan, do you have any guidance or direction on that?
Thanks
Tony
No specific guidance here but you can create your own recovery plans in SRM. Then from there when you deploy your virtual machines, add them to that recovery plan with the vRO workflows.
Hi Eric,
Protect Virtual Machine does not work in my environment. Also, when I try to execute inventory mapping, I get “[SrmException] No credentials found for remote site”