Create a simple vCO self service VM Provisioning Portal - Part 1

This article is the first in a series of tutorials for developing a basic VM self service portal. It is meant to be educational rather than exhaustive. Other articles will follow up for supporting more advanced features and a less static configuration.

Concepts covered in this article include:

  1. How to create a simple Workflow
  2. How to map inputs, outputs, and attributes
  3. How to launch a Workflow from a webview, using the vCenter Orchestrator Weboperator
  4. How to launch a Workflow from the vCenter Orchestrator Client
NOTE: Webviews were deprecated and removed in vRealize Orchestrator 7.0 - this article only applies to earlier versions of Orchestrator.

Developing the provisioning Workflow

First log in with the vCO Client, then Click on the Workflows tab and add a category (right Click / "Add Category..."). The Category helps organize your custom Workflows.

vCO create workflow category

You can now name it.


vCO Workflow category name

Now create a new Workflow (right Click / "New Workflow").

vCenter Orchestrator create workflow

You can now name it.

vCenter Orchestrator name workflow


Now that an empty Workflow has been created you can edit it (right click / Edit or Ctrl+E).

vCenter Orchestrator edit workflow

While not mandatory, it is recommended to edit the version of the Workflow every time you make a change. (Click on the last Version digit).

vCO Set workflow version


Now enter an initial comment and click OK.

vCO Versioning comment


We are now ready to create the content of the Workflow. For doing so click on the Schema tab.

vCenter Orchestrator workflow versioning


To provide the provisioning functionality to our Workflow we will use one of the many building block Workflows available in the vCenter library. To do so click on "Action & Wokflow" in the left pane.

vCenter Orchestrator Provision VM

Now drag and drop the "Workflow element" palette item on the schema.

vCenter Orchestrator Workflow element

The chooser is now expecting you to provide the name of the Workflow you want to insert in this schema. In the search box type in "Clone virtual machine, no customization". There are several clone Workflows so you want to make sure you entered enough text to filter down to one single Workflow. Click on the Workflow and then on "Select".
Please note that the Workflows showing in this list depends on what version of vCO you are running and on what additional plug-ins you have installed. You may eventually have two Workflows with similar name in a different category such as vCenter and VIM 35.

vCenter Orchestrator Workflow Chooser


Click on the "Visual Binding" tab. The visual binding will help you automating the data flow with the creation and linkage of the different inputs, outputs and variables.

vCenter Orchestrator Visual Binding


The boxes in the middle represent the inputs and outputs of the library Workflow you have just inserted into your custom Workflow. This Workflow has nine inputs and one output.

The boxes on the side represent your Workflow inputs, outputs and attributes. The inputs feed your Workflow with necessary or optional parameters. The inputs can either be manually entered (such as when the Workflow is started manually i.e the Workflow you are creating) or passed as parameters automatically (such as when started by another Workflow or another system. i.e the Clone VM Workflow). The outputs are the results that will be returned on completion. The attributes are your Workflow internal variables. These are not accessible outside of the Workflow as represented in the visual Binding view. As of now you do not have defined any inputs, outputs or variable.

Workflow Bindings

To create an input you can drag and drop the "Clone Virtual Machine" inputs in the top left "In Parameters" box.

The vm input in this Workflow is representing the VM or template to clone from. Many library Workflows have comments indicating the usage of the parameters. To check parameter comments you can switch to the "IN" tab. Switch back to "Visual Binding" tab. Drag and drop the vm input in the top left in Parameters box. This will bring the following window. All the different fields have been pre-filled for you. Click OK.

vCO Create VM Parameter


Now repeat the drag and drop operation for the vmName input.

We will link the other "Clone Virtual Machine, ..." inputs on pre-defined attributes that will not be visible by the end user.

To do so drag and drop the vmFolder input in the bottom left Attribute box. This will bring the following window.


vCO Set vmFolder

The window gives you the option to set this attribute with a value. Click on the "Not set" link in the Value field.

vCO Select target VM Folder


You should now see a treeview containing the vCenter(s) configured for this vCO server and their underlying virtual infrastructure. Drill down until you find the desired vmFolder you wish to place provisioned VMs into and click on the Select link.

Repeat the drag and drop operation with all the remaining IN parameters without forgetting to assign them values. Drag and drop the OUT parameter to the bottom right box to create a NewVm attribute. No need to set a value for this one, the Workflow will when completing.

Once completed the Visual Binding should look like this:

vCO Workflow bindings

Now that the data flow is completed we need to complete the process flow. Select the link mode as follow (as an alternative you can ctrl click).

vCO Workflow link mode

Now link the Start symbol in the schema view to the first Workflow. We will now validate the Workflow as follows

Validate Workflow

The validation will display a warning indicating we forgot to add the Workflow End symbol.

Workflow Validation with Warning

By clicking on "Create end ..." the Workflow will now validate.

Workflow Validation

As you can see below the end symbol was added and linked automatically

Workflow Completed


Click on save and close. Congratulations you have completed the workflow.

Testing the Workflow from the vCO Client

Right click on the Workflow and select "Execute workflow ..."



vCenter Orchestrator Client execute workflow

Select a template and name your new VM as wanted and submit.


vCO Client workflow inputs

You will now be able to see the Workflow progress. The schema will enlighten the current step with navigating within the different Workflows and with updating the Workflows attributes. Once the Workflow will have completed you will be able to check these.


vCenter Orchestrator Client workflow execution

On the left pane you can see the Workflow status. If something wrong happened you can view the error message at the bottom of the Variables and in the Events tab.


vCO Client workflow results

Starting the provisioning Workflow through a web Browser

vCO has a build in web server able to deploy web pages called "Web views". The weboperator is installed with vCO. It is a basic web based Workflow operator client. Before closing your vCO client click on the Web views tab". If the web operator web view does not shows a Started status right click and Click publish.


vCO Publish Webview

To access the vCO web server type in your vCO server hostname or IP address (as shown in the vCO client title bar) on the 8280 port.


vCO Web Server URL

This is the vCO root level page. Click on the "Webview List" link.


vCO Root Level Page

The next screen will list all the published Webviews. My server is running Lifecycle Manager. It may not be the case for yours. Click on weboperator.


vCO Webview List

Now log in with a user that has rights to log in vCO.


vCO Weboperator Webview

Now unfold the Workflow categories and select your Provision VM Workflow.


vCO Weboperator workflow execution

In the right pane click on "Execute Workflow".


vCenter Orchestrator Weboperator execute workflow

Fill in the input fields (the first field support both typing in with completion and tree view using the magnifier). Click submit.


vCO Weboperator workflow inputs

You will now see a new Workflow execution showing the Workflow is running. You can check the status with the schema tab. To update status and schema you may have to reload the page.

vCO Weboperator executing workflow

Congratulations you have started your Workflow through a web client !

file icon package Download the package if you ran into problems
Next articles in Series:
Part 2
Part 3