vRealize Automation 7 – Custom Actions

vRealize Automation 7 – Custom Actions

February 15, 2016 19 By Eric Shanks

We’ve deployed a virtual machine from a vRA blueprint, but we still have to manage that machine. One of the cool things we can do with vRealize Automation 7 is to add a custom action. This takes the virtual machine object and runs a vRealize Orchestration blueprint against that input. We call these actions “Day 2 Operations” since they happen post provisioning.

To create a new custom resource action go to the Design Tab –> Design –> Resource Actions. Click the “New” button to add a new action.

Select the Orchestrator workflow from the list.vra7-customaction1

The vRO workflow should have an input parameter that can be passed from a server blueprint. I’m using a VC:VirtualMachine parameter because I know it will identify the virtual machine and is passed automatically.

vra7-customaction8

On the Input Resource tab, select the IaaS VC Virtual Machien as the resource type and the Input Parameter should be filled in already.

vra7-customaction2

On the details tab enter the name and a description. The Type in my case is blank because i’m not using it for provisioning or deprovisioning. vra7-customaction3

Change the form to match your requirements. I like to keep the form as empty as possible so that users are able to request the action from a blueprint and vRO attributes fill in the rest.vra7-customaction4

When you’re done, be sure to “Publish” the blueprint so that it can be used.vra7-customaction5

Now we need to configure the action, much like we’ve configured our catalog items in a previous post.vra7-customaction6

Give the action an icon and click Finish.vra7-customaction7

Now, when we provision a virtual machine, we can see the Action that we created in our list. We can now run this action from the Items screen.

vra7-customaction9

Summary

Custom Actions are a great way to allow our users to manage their own resources after they’ve provisioned them. Since its a vRealize Orchestrator workflow, we can use these actions to put guardrails on actions to protect users from themselves. For instance maybe we replace the “Snapshot” action with a custom action that also deletes the snapshots after 3 days. It certainly can reduce helpdesk tickets that come in and ask for a snapshot to be taken.