Latest Headlines
1

Fix missing Schema Chart in weboperator-Webview

When using the bundled weboperator-Webview for vCO, current 4.x-versions have a known issue not showing the workflow chart in the schema tab of the webview:

The reason for this is that the installer of the Orchestrator miss to copy some library-files to the proper folder. I first ran into this issue a year ago, and got the solution from VMware support, in the meantime there is an KB article 1029685 about it:

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1029685

The solution is to copy two library jars from the client installation to the server’s lib folder:

As a workaround, copy 2 .jar files from the Client installation to the server installation.
If you have performed a Client/Server installation:
1. Copy o11n-application.jar and o11n-gui.jar from the directory $INSTALL_DIR/apps/lib/ to the $INSTALL_DIR/app-server/server/vmo/lib/o11n/ directory
2. Restart the VMware vCenter Orchestrator Server.
Note: If you have the VMware vCenter Orchestrator Client installed on a different machine than the Orchestrator Server, you have to copy the same files from the client installation machine to the server machine using the above steps.

The default lib-directory of the vCO-client is C:\Program Files\VMware\Orchestrator\apps\lib, so after copying the files it should look like:

After a restart of the Orchestrator server you should see your Workflow Schema as a chart:

1

Troubleshooting LDAP-Erros in vCO

VMware vCenter Orchestrator uses LDAP in different flavors:

  • For its own User Authentication (configured in the webbased configuration utility)
  • inside Workflows, e.g. when getting information about the user who started the workflow via Server.getCurrentLdapUser()
  • in Plugins (e.g. the vCO-Plugin fo Microsoft Active Directory)

Since the Workflow engine runs on a Java-Plattform, even the LDAP-calls are done using Java-Libraries. So if something goes wrong, you will get an JNDI-exception. To troubleshoot such errors, you can do following process:

  1. Get the error code:
    In the “Validation results”-area in the configuration tool, in the Events of your workflow or in the logfiles of vCO
    ldap-jndi-errors
  2. Translate error code to the JNDI-Exception to get a better description:
    http://download.oracle.com/javase/tutorial/jndi/ldap/exceptions.html
  3. (Gooogle to find other cases ๐Ÿ™‚ )
    e.g: http://stackoverflow.com/questions/1073643/adding-ldap-entries-using-jndi
  4. Fix it!

The common issues are:

  • wrong username / password
  • wrong Distinguished Name
  • user@Domain.com vs. Domain\user specification
  • Active Directory password restrcition policy when using the AD plugin

If you cannot find the reason for the error, you can do troubleshooting the hard way: Use another Java-based LDAP-Utility (like Apache LDAP Studio), and try to do the things you expect your workflow to do manually. You should get the same errors…

Good luck! ๐Ÿ˜‰

BTW: If you want to access some LDAP-information which are not exposed via the LdapUser/LdapGroup in JavaScript, you can do as workaround: Use an external commandline-tool like adfind, and call it via Command.execute() in a scripting element.
Download adfind: http://www.joeware.net/freetools/tools/adfind/index.htm
Examples for calling external scripts (here powercli, but works with adfind in the same way): http://www.vcoportal.de/examples/vco-powershell/

5

vCO & Custom Attributes

Cody Bunch, Author of the upcoming book about vCO, postet an great article about how to set Custom Attributes in vCenter’s Inventory within Workflows:
http://professionalvmware.com/2011/06/automation-101-vcenter-orchestrator-set-custom-attributes/

Reading that made me think about use-cases for Custom Attributes and vCO in real-world projects:

  • “Implicit” documentation: Custom Attributes that include contact information of the Virtual Machine Owner, Purpose of the VM, …
  • Containing Metadata about the VM: Relations to certain Backup-Jobs/Strategies, Test/Dev/Production-State, isInMaintenance, creation and expiration date, …
  • “progress bar”: During a longer running deployment process, the workflow updates the deployment stage (thanks, Andreas ๐Ÿ™‚ !)

The Scheduler in vCO can be used to run maintenance workflows for the custom attributes on a regular base, e.g. to force the VM Owner to check his contact data for updates, decommission expired virtual machines, …

Two things to keep in mind:

  1. The custom attributes are plain strings!
    So be carfeul when working with dates, numbers or enum-information there, you have to do some effort to parse the strings to convert it back to the source/target JavaScript datatype in vCO.
  2. Custom Attributes are changeable via vSphere client!
    User’s can edit these fields without any knowledge about the workflows at all, which allows the user to bypass any business logic in your workflows.
    So make sure to validate the information you read from the attributes (and consider other places to store information which is essential for the business logic of your workflows).
    (You could also think about some security issues when somebody inserts bad values which cause your workflows to behave bad.)

A small example how to validate a date which is stored in a custom attribute:


//Get expiration date string, cast/parse to date
var datStr = System.getModule("com.vmware.library.vc.customattribute").getCustomField(managedEntity, custField); System.debug("datStr: " + datStr);
try {
 var expirationDate = new Date(Date.parse(datStr));
System.debug("isDate: " + (expirationDate instanceof Date));
System.debug("value: " + expirationDate);
if (!expirationDate) throw "No valid expiration date in custom fields for " + managedEntity.name;
} catch (ex) {
throw "Cannot parse expiration date for VM " + vm.name;
 }
 return expirationDate;

For the future: There are some signs in the API for another, more powerful way to add metadata to vCenter Inventory Objects: Tags. See the “sneak preview” on Steve Jin’s great blog:
http://www.doublecloud.org/2011/06/tagging-an-invisible-feature-in-vsphere/
http://www.doublecloud.org/2011/06/tagging-what%e2%80%99s-the-alternative/

0

vCO-Plugins: Your feedback wanted!

Just some days offline for vacation, the vCO world goes crazy ๐Ÿ˜€ :

VMware release half a sixpack of new vCO-Plugins:

This is really great news, especially the first two rise the bar for integrating external systems to a new level!

You can find references:
Documentation: https://www.vmware.com/support/pubs/vco_plugins_pubs.html
Examples: http://blogs.vmware.com/orchestrator/

After the release, the vCO documentation team asks for your feedback:
http://communities.vmware.com/message/1780441#1780441

So show them your feedback, it (hopefully) will impact future plugin development as well.
(and right now, the vCO community is, eeh, not sooo big, so your vote counts heavily!)

 

0

Orchestrator@VMworld 2011

The content catalog for this year’s VMworld event in Las Vegas is online:
https://vmworld2011.wingateweb.com/scheduler/public.jsp

A quick search for the most important keyword brought up three sessions about vCO:

 

I will share one session with Subramanya Kumar about Integration with Orchestrator on the Technology Exchange Track. Subramanya will talk about a quite cool and very useful tool for vCO Plugin Developer.

There are also 23 Hands-on-Labs (very valuable at the past events!), hopefully some of them will include Orchestrator as well.

See you in Vegas! ๐Ÿ˜Ž ๐Ÿ˜Ž ๐Ÿ˜€