WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
  • VKS
  • Homelab
    • Resources
    • Nested Virtualization
  • VMware Nostalgia
  • Apple

How to Find a vCO Workflow ID

12.08.2011 by William Lam // 3 Comments

Recently while working on my blog post Leveraging vCD + vCO + Wavemaker Part 1, I needed to find the workflowId for the workflow I created in vCenter Orchestrator. The workflowId as one would expect is just a unique identifier for vCO to keep track of all the workflows in the system. When using the vCO Java Client, the workflowId is not something users need to worry about as the workflow names are presented through the client. Though if you are using the vCO API, such as calling the executeWorkflow method, then you will need to know the ID of the given workflow.

There are several ways you can locate the workflowId, here are three different methods:

Method 1:

After creating/editing a workflow, the vCO Java Client creates .vmware directory with some files locally in your home directory. (e.g. in Windows it would be under %userprofile%)

There is a file called "[username]-edited-list.xml" which contains a list of the most recently edited workflows.

When you open the file, you will noticed the very last entry is the workflow that you just created/edited and it displays only the workflowId but not the name. Assuming you are not using a shared account or logging in with same username, this is quick/dirty way of retrieving the workflowId but no easy way to confirm that it is in fact the workflow you are inquiring about.

Method 2:

In the vCO Configuration page, you can enable "DEBUG" logging which will also capture all workflow execution as part of the verbose output including both the name of the workflow that was executed and it's ID within the logs. Once you have captured the workflowId, you can easily revert "DEBUG" mode to "INFO" mode and does not require a restart of the vCO service.

Method 3:

Lastly, you can actually create a workflow in vCO to find the workflowId for a given workflow. Just create a new workflow and give it a name and configure it to take an input string for the name of the workflow and output string for the workflowId.

Here is the vCO script that queries for all workflow's and queries for the specific workflow in question:

Here is what you will see as the output when running the getWorkflowId workflow:

 UPDATE:

Method 4 (Thanks to Jorg Lew) :
You can actually retrieve the workflow ID by just selecting the workflow in the vCO Java Client and pressing CTRL+C (keyboard copy shortcut) and then pasting that into text editor. This will actually display the XML-representation of the workflow.

There are multiple ways to retrieve the workflowId in vCO, but method #4 is definitely what I would recommend as it is the easiest method within the vCO Java Client.

Categories // Uncategorized Tags // orchestrator, vCO, workflow

Leveraging vCD + vCO + Wavemaker Part 1

12.05.2011 by William Lam // 4 Comments

A few weeks back I had a discussion with Maish Saidel-Keesing and Jason Boche on twitter about whether or not a user can be part of multiple vCloud organizations, and the answer is yes. Maish followed up with the question of whether it was possible to have users access a single URL and be forwarded to their correct organization URL. The answer of course is yes and I suggested one could build a simple intranet/webapp utilizing the vCloud API to query for a given user and to dynamically generate the organization URLs for that user.

I thought that was the end of that conversation until a little later in the day when I noticed an interesting blog post vCO - wavemaker, your cloud webservice (part I) by Christian Johannsen showing how to create a simple web application using VMware's recent acquisition of Wavemaker and vCenter Orchestrator. A little light bulb went off and my curiosity got the best of me giving me an idea. I wanted to see if it was possible to leverage vCenter Orchestrator, the new vCloud Director plugin for vCO and Wavemaker to create a simple web application that would solve the above use case.

In this first of two part post, I will first demonstrate how to create a vCO workflow using the new vCloud Director plugin. If you can not wait, go to the bottom of this post to check out video of the final results.

Here is an example of my vCloud Director lab setup in which there are multiple organizations with multiple users in each organization.

As you can see, we show that "coke-admin" user is part of multiple organizations "Coke" and "MysterDrink".

Next let's take a look at our vCO server and configuration (I'm using the vCO virtual appliance). I will assume you have installed and configured the new vCloud Director plugin for vCO. If not, take a look at here for the documentation.

Now let's launch the vCO Client, you can access this by just pointing your browser to your vCO Server if you are using the vCO virtual appliance and clicking on "Start Orchestrator Client".

You will now login to your vCO Server using either the default credentials or an account you created within your director services (AD,LDAP).

To verify that the vCloud Director plugin for vCO was configured correctly, click on the "Inventory" tab on the left and you should be able to expand out your vCloud Director inventory. 

Now you are ready to create your workflow, click on the "Workflows" tab on the left.

Create a new directory to help organize your custom workflows. Right click on Library to create a new director. In this example I am calling it "vCloud Director Custom".

Next, right click on the director that was just created and create a new workflow. In this example I am calling it "getUserOrgUrls".

Right click on the new workflow that was just created and click on "Edit" which will allow us to start creating our workflow.

Let's define our input parameter which will be the name of the user inquiring about the organizations he/she is part of. Click on the orange button to create a new input variable, the type will be "string" and in this example I named the variable "userName" which will be used a little bit later in the workflow creation.

Let's define our output parameter which will be a list of organizations URLs the user is part of. Click on the green button to create a new output variable, the type will be "array/string" and in this example I named the variable "OrgUrls" which will also be used later in the workflow.

Next click on "Schema" tab and add a "Scriptable Task" and "End workflow" element to the workflow.

Then click on the Connector Tool next to the Validate button and connect the starting element to "Scriptable task" and to "End workflow" element.

Now we will create a simple vCO script to actually perform the query of the "userName" and return a list of "orgUrls". Click on the "Scriptable task" element and you should see a new screen load at the bottom like the following.

Next we will bind our input variable, click on the on the icon next to the X and select "userName" variable which we created earlier.

Next will bind our output variable, click on the on the icon next to the X and select "orgUrls" variable which we created earlier.

To verify that both your input and output variables were binded, correct, you can click on the "Visual Binding" tab and it should look like the following.

Lastly, we will insert our vCO script. Click on "Scripting" tab and insert the following snippet.

I would like to thank both Christian Johannsen and Christophe Decanini for their assistance on the vCO script. These guys are rock stars when it comes to vCO and you should definitely follow them on twitter if you are not already.

Next we will validate the script to ensure all input/output parameters were used correctly and we do not have any known syntax errors in the script. Click on the "Validate" button at the top and you should get no warnings/errors.

Okay, we are all done now! Let's go ahead and give our new workflow a test run. Here is a quick video on executing our getUserOrgUrl workflow:

Leveraging vCD + vCO + Wavemaker Part 1 from lamw on Vimeo.

As you can see, we can easily leverage vCO and the new vCloud Director plugin to perform a variety of tasks not only limited to orchestrated-based operations but even simple queries as well. In my next post, I will show you how to integrate this with Wavemaker to present a simple web application for end users to consume. Stay tuned!

Categories // Uncategorized Tags // orchestrator, vcd, vcloud director, vCO, wavemaker

Unattended Deployment of vCenter Orchestrator Virtual Appliance

11.14.2011 by William Lam // 9 Comments

This weekend I spent sometime with the new vCenter Orchestrator virtual appliance in the ghetto lab. Instead of using the vSphere Client to deploy the OVF, I wanted to see if I could deploy it 100% from the command line using the ovftool. One of the cool things about OVF from an author perspective, is the ability to create custom variables which can then be specified during deployment to include guest customization, network or application configurations.

In the case of the new vCO virtual appliance, VMware provides the following four variables to customize the network configuration:

  • vami.DNS.vCO_Appliance
  • vami.gateway.vCO_Appliance
  • vami.ip0.vCO_Appliance
  • vami.netmask0.vCO_Appliance

Using the ovftool, you can specify the following variables to not only deploy the vCO OVF through the commandline but also configure the guestOS network without having to manually go through vSphere Client or remote console.

Here is an example of the ovftool command to deploy vCO:

/usr/bin/ovftool --acceptAllEulas --skipManifestCheck '--net:Network 1=VM_Network' --datastore=vesxi50-1-local-storage-1 --diskMode=thin --name=vco --prop:vami.DNS.vCO_Appliance=172.30.0.100 --prop:vami.gateway.vCO_Appliance=172.30.0.1 --prop:vami.ip0.vCO_Appliance=172.30.0.142 --prop:vami.netmask0.vCO_Appliance=255.255.255.0 vCO_VA-4.2.0.1-507352_OVF10.ovf 'vi://root:*protected email*/?dns=vesxi50-1.primp-industries.com'
Opening OVF source: vCO_VA-4.2.0.1-507352_OVF10.ovf

If the command looks a little daunting, it is really not and to make the deployment of vCO even simpler, I decided to write a small shell script called deployvCO.sh that users can use.

The script assumes you have ovftool installed and downloaded both the vCO OVF and system disk in the same working directory. You will need to edit a few variables within the script which specifies the vCenter and ESXi host to deploy to and resources for vCO appliance such as network portgroup, datastore, etc.

Note: There are many ways of using the ovftool to deploy an OVF. In this simple example, it requires you to specify an ESX(i) host, but you can modify the locator to deploy to a VM folder or datacenter path. For more examples and options, please take a look at the ovftool documentation.

Here is an example of the script in action:

Once the vCO virtual appliance has been deployed, you can also have it automatically power on by specifying the following parameter --powerOn.

If everything was successful, you should now be able to point your browser to the hostname of your vCO server and you should taken to the vCO splash screen.

Now you can easily deploy vCO without the need of the vSphere Client! Happy workflowing 🙂

Categories // Automation, OVFTool Tags // orchestrator, ovftool, vCO

  • « Previous Page
  • 1
  • 2
  • 3

Search

Thank Author

Author

William is Distinguished Platform Engineering Architect in the VMware Cloud Foundation (VCF) Division at Broadcom. His primary focus is helping customers and partners build, run and operate a modern Private Cloud using the VMware Cloud Foundation (VCF) platform.

Connect

  • Bluesky
  • Email
  • GitHub
  • LinkedIn
  • Mastodon
  • Reddit
  • RSS
  • Twitter
  • Vimeo

Recent

  • Programmatically accessing the Broadcom Compatibility Guide (BCG) 05/06/2025
  • Quick Tip - Validating Broadcom Download Token  05/01/2025
  • Supported chipsets for the USB Network Native Driver for ESXi Fling 04/23/2025
  • vCenter Identity Federation with Authelia 04/16/2025
  • vCenter Server Identity Federation with Kanidm 04/10/2025

Advertisment

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

Copyright WilliamLam.com © 2025