Automating the vRealize Automation Manager Service Failover

During a couple of vRealize Automation (vRA) design engagements I had to explain that the vRealize Automation Manager Service doesn’t have an Automated Failover process (active/passive) and relies on a manual intervention. This was quite hard for the customers to understand and accept because of active / active redundancy of other vRA components like the Web Service.

So OK what does the vRA Manager Service do (link)?

The Manager Service is a Windows service that coordinates communication between IaaS DEMs, the SQL Server database, agents, and SMTP. IaaS requires that only one Windows machine actively run the Manager Service. For backup or high availability, you may deploy additional Windows machines where you manually start the Manager Service if the active service stops.

And that last part is something my customers didn’t like (at all) because this depends on a person to activate the service manually. OK then how can we solve this?

Automating the Manager Service Failover

I like to keep things simple and wanted to Automate the Manager Service failover with vRealize Operations (vROps) monitoring the service and kicking off an action when the service is down. Eventually I got this to work but this took way too much effort and didn’t like the complex setup of vROps sending a SNMP trap to vRO and then let vRO kick off a Powershell script on the vRA IaaS Manager server. So back to the drawing board and the solution was way too simple… Running a scheduled task on the Secondary vRA IaaS Manager server that checks the Manager Service on the Primary and then starts it locally when the service is down.

Pre-requisites

  • Powershell allows the execution of scripts
  • Scheduled task is running under the vRA Service Account
  •  
    The Script

     
    Scheduling the execution of the script

    Now copy the script and store it on the Secondary vRA IaaS Server running the “passive” Manager service under for example:
    C:\Scripts\vRAManagerServiceCheck.ps1

    Open the Task Scheduler and select Create Task.

    Give the Scheduled Task a Name and select “Run whether user is logged on or not” and “Run with highest privileges”.

    Manager Service

    Select Triggers and “New”, select “Daily” fill in 00:00:00 as start time. Select “Repeat task every” 5 mins “for a duration of” 1 day. And optionally select “Stop task if it runs longer than” 30 mins. And select OK

    vRA-Manager-02

    Select Actions and “New”, fill in as “Program/Script” PowerShell and under “Add arguments (optional)” –File “C:\Scripts\vRAManagerServiceCheck.ps1”. And select OK on the Create Task form.

    vRA-Manager-04

    Fill in the vRA Service Account where the script is started under.

    vRA-Manager-03

    Wait for 5 minutes and voila status 0x0 (successful)!

    vRA-Manager-05

    Now this is a really basic script and it can be extended with for example some logging and additional service checking etc etc but of course that all depends on the requirements of the customer! 🙂

    Marco van Baggum

    Marco van Baggum

    Works as a Virtualization Consultant for ITQ. More details can be found on the About page

    Leave a Reply

    Your email address will not be published. Required fields are marked *