In a previous article I introduced the Advanced Service Designer (ASD), one of the new components of vCloud Automation Center 6.0 (vCAC). If you’re new to the ASD, I suggest you read part I of this post first.
In this article I will demonstrate how to create a ‘resource action’ using a standard vCenter Orchestrator (vCO) workflow which is called from vCAC. I will also demonstrate how to duplicate and change a workflow in vCO, and how to connect this new customized workflow to vCAC and the newly created Service Blueprint.
In the previous article we created a ‘VC:VirtualMachine’ object; this is a vCenter virtual machine which is accessed through the vCenter Orchestrator. Let’s add a ‘power on’, ‘shutdown guest’ and ‘power off action’ to this object, and link it to our newly created Service Blueprint. A vCAC end user can use the action straight from the vCloud Automation Center portal.
Create a Resource Action in the Advanced Service Designer
The process for creating a resource action is pretty straightforward:
- Select the Resource Actions tab in the Advanced Service Designer;
- Select the workflow that will execute the action you want to create. vCAC shows the workflows which are available from the vCO server that is linked to the vCAC instance. In this example I will use one of the preconfigured workflows that are included in the embedded vCO server:
- Start virtual machine and wait;
- Shutdown Guest OS and wait;
- Power off virtual machine and wait;
- The resource type is vCenter Virtual Machine (this is the name of the VC:VirtualMachine object) with input parameter VM;
- Leave the next two steps at the default settings;
- After setting up the resource action, don’t forget to publish the new custom resource actions. This option is available in the pull-down menu of the new resource action.
The resource actions screen should now look like this:
The new resource actions should also show up under Administration->Catalog Management->Actions. Now add the actions under the Entitlements tab:
If everything went as expected, the new resource actions will show up under a deployed item:
After hitting Power On you will see vCenter Orchestrator will deploy your virtual machine (check the task pane in the vSphere client). Check the requests tab in vCAC to see what the current execution status is:
As you can see, the status is ‘In Progress’, and finally displayed Failed (at least in my case). The reason for this is that I don’t have VMware Tools installed. This particular workflow is called ‘Start Virtual Machine and wait [for VMware Tools]’ and thus will wait for the VMware Tools to start.
As an example, I want to show you how simple it is to change the vCO workflow so it won’t wait for VMware Tools anymore.
Changing the behavior of the default vCO workflow
Open the vCenter Orchestrator Client (the link is available on the vCAC homepage: https://vcacserver/) and navigate to the Start virtual machine and wait workflow. Notice the three erroneous results, which occur because the VMware Tools won’t start.
Let’s add a new workflow by duplicating the Start virtual machine and wait workflow. This new workflow is called Start virtual machine and don’t wait [for VMware tools]. Remove the vim3WaitToolsStarte action and also remove the progress, pollRate and timeout attributes. Check the workflow by using the debug feature in vCO.
The figure on the right shows you which item to remove from the workflow.
After this you can use the new workflow and create a new Resource Action. The new action will show up in the portal and can now be used for the custom resource.
Good luck with configuring your own custom resources!
Take a look at this nice article by Preetam Zare: Integrating vCenter Orchestrator with vCloud Automation Center–Advance Service Design.