«

»

May 15 2012

VMware View automation with vCenter Orchestrator

Advertisement

In many organizations automation is a key component that allow IT to spend cycles where the business need them – perhaps innovation. Many VMware products have their own API’s and SDK that help organizations to automate process. VMware View doesn’t have publically available API’s that can be used in the automation process. However, VMware View does expose PowerShell cmdlets that can be used in the construction of a automated process via PowerShell scripts or via the construction of vCenter Orchestrator Workflows.

This article focus on the second one; vCO Workflows.

Not many people know that vCO can talk PowerShell using a PS module and that it’s a free tool that is automatically installed with your vCenter Server. The vCO PS module has the ability to create custom workflows based on a single PS cmdlet using a pre-defined workflow called: Generate an action for a PowerShell cmdled. This workflow can be found under Library > PowerShell.

The diagram below demonstrate a workflow created using Generate an action for a PowerShell cmdled for the VMware View PowerShell cmdlet Add-AutomaticLinkedClonePool. This View PS cmdlet as the name says, create a pool with Linked Clone desktops.

 

Screen Shot 2012-04-30 at 6.05.25 PM

A basic tutorial of how to start using vCO and View PowerShell cmdlets has been created and posted in the VMware Communities. However, the example that was given in the post will not work for all VMware View cmdlets. In the post the author utilizes the com. vmware.library.powershell.generated module, while using the com.vmware.basic module will probably cater for all VMware View PS cmdlets. This is very important because choosing the wrong module will make the workflow not work properly.

Below I demonstrate the Generate an action for a PowerShell cmdled wizard for the Remove-Pool cmdlet.

Screen Shot 2012-04-30 at 6.59.12 PM

 

To start creating your workflows to the following:

- Enable WinRM on the VMware View Server, by following the instructions on the PowerShell plugin documentation page. You will find this under “Supported Communication Protocol”, “Configure WinRM to Use HTTP”.

- Add the View Manager host to the VCO.
In VCO, Library -> PowerShell ->Configuration->Add a PowerShell host

- Create a Folder off the root library, called “View 5”.

- Make sure Generate a workflow is set to Yes.

- Run the Generate an action for a PowerShell cmdled wizard using com.vmware.basic module.

 

When selecting the PS cmdlet expand VMware.View.Broker SnapIn and you will be able to select one of the cmdlets available (see picture below).

Screen Shot 2012-04-30 at 7.00.21 PM

 

The Generate an action for a PowerShell cmdled will create another workflow with the name you specified and this new workflow will contain the JavaScript calls necessary to talk to the PS objects in VMware View.

Screen Shot 2012-04-30 at 7.36.48 PM

 

Moving forward you will need to get familiar with Orchestrator and how to interact and create workflows. The example below demonstrate a workflow that interact with Active Directory and Oracle objects before defining the pool name for the Pool creation.

 

Screen Shot 2012-05-13 at 7.45.05 PM

 

vCO has plugins and sample workflows for many VMware and Non-VMware products including vCenter, vCloud Director, Chargeback, Active Directory, PowerShell, SSH, XML, JDBC amongst others.

Over the next few posts I will start to publish examples of vCO workflow automation for VMware View. However, if you have created any interesting workflows or is willing to create a vCO workflow library for VMware View, please share with the community.

 

This article was first published by Andre Leibovici (@andreleibovici) at myvirtualcloud.net.

 

 

Similar Posts:

Permanent link to this article: http://myvirtualcloud.net/?p=3320

2 comments

2 pings

  1. dlink7

    You don’t see any security issues with “WinRM to Use HTTP”?

    Xangati requires you to Enable unencrypted traffic to allow HTTP access.
    winrm set winrm/config/service @{AllowUnencrypted=”true”}

    They say “Despite using HTTP as the protocol, Xangati software uses a secure authentication scheme (Kerberos) for logging into the server. This means that the user’s
    credentials are not sent in the clear.”

    Thoughts?

  2. Andre Leibovici

    @dlink7
    HTTP comes with a security concern, yes. However it is possible to use HTTPS with certificates for improved security. For an Enterprise deployment I recommend you to make use of certificates.

    Andre

  1. - Cliff Davies

    [...] I found this great article by Andre Leibovici which explains how to create vCenter Orchestrator Workflows using PowerShell. Andre currently works for VMware in the Office of the CTO as a View Architect and is obviously very knowledgeable in all things View-related as well as Virtualization and Cloud Computing. The article can be read below and was originally published on Andre’s blog at MyVirtualCloud.net. [...]

  2. View automation with vCenter | David Cearlock

    [...] May 25th, 2012 | Add a Comment myvirtualcloud.net » VMware View automation with vCenter … [...]

Leave a Reply