Adding Custom Resource Actions for vRA 7.x

This post will walk through adding a resource action for vRealize Automation 7.x, mapped to a custom vRO workflow. The steps below assume that the vRO instance has been integrated with vRA.

Log into the vRealize Automation portal as a user with service architect permissions. From the Design tab select XaaS and Resource Actions. Any existing resource actions are listed. Click New.

vra1

Map the resource action to the relevant vRO workflow. In this example I am using a workflow that adds a virtual machine to a backup job. You can use any workflow that has been configured to accept an input parameter from a vRA item. For this particular case we are using the VC:VirtualMachine parameter which passes the virtual machine provisioned by vRA.

vra2

If not already populated select the relevant input mappings. In this case the resource type is IaaS VC Virtual Machine, the input parameter matches up with the parameter configured in the vRO workflow (whatever you have named it, vmObj here), and this maps to the VC:VirtualMachine orchestrator type.

If your vRO parameter does not have a corresponding mapping already in vRA or ready to be imported into vRA then you can create a new / custom resource mapping in the Resource Mappings page.

vra3

Enter a name and description for the resource action. Configure the remaining settings as appropriate, you have the option to set a provisioning or disposal type (leave blank if neither) and have the action always available or only when a certain criteria is met.

If you un-select the hide catalog request information page the user is prompted for a description and reason for requesting the resource action.

vra11

Once you have completed the details page click Next.

vra4

Edit the form to represent how you want the action to be displayed to users. Most of this configuration should be obtained from the vRO workflow so you may not need to make changes here. Click Finish.

vra5

The new resource action is now listed as a draft. To start using the action select it and click Publish.

vra6

Now select the Administration tab and Catalog Management. Open the Actions page, the new resource action we created should now be displayed.

If you want to change the icon of the resource action you can do so by selection the action and clicking Configure. There are a number of useful vRA icons available here, including sample icons for day 2 actions. In my example I am unable to update the icon which seems to be an issue with custom actions created in vRA 7.2; resolved in 7.3 as per this KB article.

vra7

The next step is to assign our custom action to an entitlement. Open the Entitlements page and select the relevant entitlement. Click the Items & Approvals tab, under Entitled Actions click the green plus symbol. Locate the new resource action and select the check box to add it to the entitled actions. Click Ok and Finish.

vra8

To confirm the configuration has worked browse to the Items tab and select Machines. Any virtual machines that have the custom resource action added to the entitlement will show the new action in the drop-down Actions menu.

vra9

When I select the new action I am presented with the action form as per the design canvas we saw earlier. In this example I select the backup job from the drop-down list of jobs that my vRO workflow has pulled from the backup server, and click Submit. The VC:VirtualMachine parameter is then passed through to the next stage of the workflow, which adds machine to the selected backup job.

vra10

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: