Version 126.96.36.199 of the Runecast plugin for vRO aimed to simplify the integration between those two products. If you haven’t tried our vRO plugin yet, I recommend going through the “Runecast Analyzer plugin for vRO” blog post which will give you a head start.
We’ve included a method to initiate a scan of a given vCenter. The method is accessible from the main RunecastAnalyzer object and accepts the vCenter UUID as an argument.
The example below shows the usage of the method and assumes you already have added RunecastAnalyzer to vRO using the plugin:
var rc = RunecastAnalyzerManager.getRunecastAnalyzer("your-runecast-name"); var startScan = rc.scanVC(“VCUUID”);
The scanVC method returns true if the scan was triggered successfully and false if for some reason the scan was not successfully performed. Usually you would use this method at the beginning, the end, or both in your remediation workflows. This will ensure you are working with latest scan results.
These are the building blocks for your remediation workflow. By default vRO comes with a rich library of Actions and Workflows what can be reused and put together to achieve complex tasks. The Runecast plugin adds additional content to help you build your remediation workflows:
Now we’re going to take a closer look at the Actions and Workflows that come with the Runecast plugin.
When querying for affected objects from Runecast Analyzer, we receive an array of rcAffectedObject. Those objects include name, moid, type and vcuid. In the initial version of the vRO plugin, you had to write your own scripts to convert those to actual VC objects which you could then manipulate. That’s no longer the case as in version 1.0.2 we have included actions for converting rcAffectedObject to VC:VirtualMachine or VC:HostSystem:
rcObjectToHost - converts array of rcAffectedObjects to array of VC:HostSystem
rcObjectTo VM - converts array of rcAffectedObjects to array of VC:VirtualMachine
Both of these actions are optimized to work with objects across multiple vCenters in an efficient way, querying only the vCenter Servers that have affected objects reported. Also, thanks to Joerg Lew’s feedback, an improvement was made on the method used to get the VC managed objects to make it less resource intensive. You’re not required to write even a single line of code to achieve that.
Implementing a lot of workarounds or fixes to many objects requires changing advanced settings on a Host or Virtual Machine. In addition, you probably don’t want to apply a workaround on all your affected systems at once. It’s always a good practice to use a test environment first and validate the solution before proceeding with production systems.
To make things easier, we’ve included the following workflows as part of our plugin:
Host set advanced config
This workflow accepts a host, advOpt_key and advOpt_value. It will set the advanced setting (advOpt_key) with a value (advOpt_value) on the host. It’s suitable for using within a ForEach loop if you want to apply this setting to multiple hosts. The advOpt_key should be the same as you see in the advanced settings panel for the Host in the vSphere Web Client.
VM set advanced config
In a very similar way to “Host set advanced config” workflow, here you can set an advanced setting for a Virtual Machine. The input parameters are vm, key and value.
This workflow has array of VC hosts as input and output parameters. The idea here is that you will be presented with the hosts from the input parameter and then choose which hosts want to apply the changes to. The output parameter will include only the selected hosts.
Going forward, we will continue adding similar workflows to help you speed up your remediation or day-two operations process.
Below is a simple example of how we can put our building blocks together and address VMware KB1012225 by adding devices.hotplug advanced setting with the value false on the VMs:
Thanks to the Actions and Workflows packaged with our vRO plugin, this was achieved by typing only one line of code in the “Get affected objects” stage:
rcAffectedObjects = rc.getAffectedByKB("1012225");
This workflow can easily be extended with functionality like shutting down running VMs, powering on after the fix is applied etc. As I mentioned before, there are plenty of built in workflows available for you to use.
You can already download the new version of Runecast plugin for vRO and start automating. If you need a hand, take a look at the recording of our recent webinar, where I create a remediation workflow from scratch.
These new capabilities of the Runecast Plugin for vRO make it much easier for vSphere administrators to automate remediation tasks, and remove the need for developing lots of custom code.
Joerg Lew, @joerglew
Orchestrator Specialist & Automation/Integration Generalist