Deploying a VM with vCAC’s Advanced Service Designer (part II/II)

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

vcac-asd08The process for creating a resource action is pretty straightforward:

  1. Select the Resource Actions tab in the Advanced Service Designer;
  2. 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;
  3. The resource type is vCenter Virtual Machine (this is the name of the VC:VirtualMachine object) with input parameter VM;
  4. Leave the next two steps at the default settings;
  5. 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:

vcac-asd05

The new resource actions should also show up under Administration->Catalog Management->Actions. Now add the actions under the Entitlements tab:

vcac-asd06

If everything went as expected, the new resource actions will show up under a deployed item:

vcac-asd07

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:

vcac-asd09

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.

vcac-asd10

 

vcac-asd11Let’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.

 

Featured Posts on viktorious.nl

About viktorious

Viktor van den Berg is a Solution Architect for PQR and VCDX #121.

Viktor is a regular speaker at seminars and conferences. Continue reading...

Comments (3)

  • Ansgar

    Hi there,

    just read your post, tried it myself and everything worked out fine.
    Only problem I got is I can’t delete the provisioned VM from within vcac. Even after deleting the VMs from vCenter, the VMs still show up under “Items” for the User who requested the machines.
    How can I get rid of those leftovers?
    Thanks a lot in advance!

    Reply
    • viktorious

      I would advise to create/add an extra action for the item called “delete/remove virtual machine” and next time remove the virtual machine from the items list using this action. Because you already removed the virtual machine from the vCenter you can try to rescan the inventory in vRA and see if the VM is removed. Otherwise use the suggestions in this community article:
      https://communities.vmware.com/message/2468100
      to remove the item directly from the DB (use at own risk).

      Good luck!

      Reply

Leave a Comment

© 2013 Powered By Wordpress

Scroll to top