Run a program in guest from vCloud Automation Center

vCloud Automation Center is the VMware hybrid cloud self-service provisioning portal. It can be customized to extend its OOTB functionality. The following tutorial shows how from the vSphere web client create a menu operation to run a program in a guest or how to do it automatically once the VM has been provisioned. This does not involve any scripting !


vCenter Orchestrator configured with:

  • vCenter plug-in (with the same host used in vCAC)
  • vCAC plug-in 5.2 (with the vCAC host)
  • vCloud Director plug-in (no host needed for this use case)


vCloud Automation Center configured with:

  • vCO endpoint



vCO integration with vSphere web client (out of the box with windows installation of vCenter, follow this guide to do it with the vCO appliance). If you do not have the integration you can still do this tutorial using the vCO client.


Running a program in a guest VM

There are countless use cases for running a program within a guest VM. For example post provisioning scripts / software installation. With the following guest operation method you do not need to have the VM accessible remotely through the network, you just need to have appropriate VM credentials.

In the vSphere web client type as below in the search field.



Right click / Run a workflow.




Enter the VM credential, select the VM.



Enter the program you want to run with its full path.Here it is a Windows VM but it could be a Linux host as well. Starting notepad remotely is not really useful but you get the idea.




Make sure it ran successfully since we will need this for the rest of the tutorial.


This step was not mandatory but we needed to make sure you have the settings right and it will also make our life easier later.


Installation of the vCAC extensibility package for vCO

The package is now part of the 5.2 plug-in.

If not done already install it with searching and running the following workflow. If you did this already you can skip to the next section.



Select your vCAC host.



You can leave the defaults on this screen.



And on this one as well. You can create up to 16 vCO menus.


You can run this workflow again any time if you need to change any of the settings.


Customize the menu operation

Now that we have done the basic installation we are going to customize a menu operation for our needs.

Search and run the following workflow.



Select the host, the menu operation you want to customize, Enter a menu operation label



On the next page you can pick up an icon. If you use the vCO client you will see the icon but not in the vSphere client. You can customize the default authorizations (basically anyone). For display state remove "Off" since we do not want to start the workflow running the program in guest when the VM is powered off.




Assign a menu operation to blueprints and their VMs

The menu operation we customized is not yet avalable since it has not been assigned to any blueprint or VM. This is what is done in this step.

Search and run the following workflow.



Select a menu operation (the one below if this is the first you create).



Select on which blueprints you want to apply this menu. For this tutorial this must be a vCenter VM. If you need the menu to be available on existing machines provisioned from the blueprints you selected use the check mark "Apply ...".



We are going to select the same workflow as we ran in the vSphere web client : "Run program in guest"

The next two check marks are important. The workflow "Run program in guest" has multiple inputs. The menu operation will pass the contextual VM to the workflow but cannot guess the other input parameters and their values. The first checkmark allows storing the inputs of the vCO workflow as properties of the blueprint so you can set their values. The second one does it for you based on the last input parameters entered when running the workflow.




If you go in vCAC, provision a VM from one of the blueprints you assigned a menu operation to (or use an existing one if you had chosen the option to apply the menu to existing VMs) you will see the "Start notepad" menu operation. You are almost ready to test it.



One extra step to set the password

With a vCO workflow that does not have a secureString input parameter you would be finished but since the "Run in guest" as a secureString password input parameter there is one additional step before you can use the menu.


Right click / edit the blueprints and / or VMs that have been assigned a menu operation.



Go on the properties tab. You will see listed several properties starting with ExternalWFStubs.WFvCOMachineMenu1 and finishing with the input parameters of the workflow you selected. The values are also set except for the password one. This is a security feature of vCO. Edit the vmPassword property and set the password for the guest OS credential vmUsername. Note that this password will be displayed in clear to vCAC accounts that can list these properties (obviously not the end users). Using the vCAC encrypt check mark is not an option since vCO will receive an encrypted password. If you want the password not to be listed at all you can simply create a new vCO workflow, add the "run program in guest" library workflow to it, right click / synchronize presentation and then move the password input as attribute and assign your password there. You can then use your created workflow in the "customize a menu operation" section.



You can now use the menu.

Great but what if you need this program to start automatically in the guest OS when the VM is provisioned ?


Assign a state change workflow to blueprints and their VMs

Search and run the following workflow.




There are six vCAC workflow stubs allowing to run external processes. In our case we need to run the workflow once the machine has been provisioned. Select the vCAC host.



Add which blueprints need to run the vCO workflow once the VM has been provisioned. "Apply machine operation ..." is unnecessary since the machines already provisioned will not be any more in the "MachineProvisioned" state.



Select the "Run program in guest" workflow. Use both checkmark options to create the additional vCO inputs as properties.



Do not forget to set the password as described in the "One extra step to set the password" section.

Now wehn a VM will be provisioned from the selected blueprint, it will automatically start the "Run program in guest" workflow.



With this tutorial you should be able to extend vCAC to run any vCO workflow (existing in the vCO library, partners plug-ins, communities workflows or one you create).

This is really powerful and add a new way to consume vCO workflows:

  • vSphere web client -> vCO workflow
  • vSphere vCenter -> SNMP -> vCO workflow
  • vCloud Director notifications and blocking tasks -> rabbitMQ -> vCO workflow
  • vCloud Director extensions -> rabbitMQ -> vCO worflow
  • vCenter Operations -> SNMP -> vCO workflow
  • Service Manager -> vCO workflow
  • vCloud Automation Center -> vCO workflow
  • Your custom portal -> REST API -> vCO workflow
  • Your vendor application -> SNMP -> vCO workflow


All integrations lead to vCO !


0 # Tomio 2015-07-17 08:55
Anyone got this working in VCAC62?
0 # ashokvsetty 2015-02-20 14:03
how to run the program in Guest OS from VCO when we the VMware tools are not running on it?

we are trying to solve a serious situtaion in our company, when all the Linux VMs get into readonly filesystem due to network outage and to fix we restart all the VMs and most of them stucks at password prompt and we manually login to each VM provide password then run fsck and restart it.. so trying can we automate this task using VCO or any other tools.

Any help in this regard much appreciated
0 # Eric H 2014-10-17 04:19
How about doing a few Linux examples?
+1 # burke 2014-04-24 13:59
Quoting Ram:
Thanks for the article.
Can you refer any book for learning these features?


No, not currently, right now your BEST opportunity to learn these features is through blog posts here and other vCO and vCAC related blogs (see our blogroll). Additionally, the VMware Communities are VERY active for both products ;)
0 # Ram 2014-04-24 02:14
Thanks for the article.
Can you refer any book for learning these features?

+1 # Alan 2014-04-15 15:52
actualy this is not working for vCAC6, i mean in my environment :) , could you please confirm? i can see the custom properties properties, but notthe menu under the catalog item..
any tips?
congrats for this amazing blog
0 # burke 2013-11-14 12:59
Quoting vpourchet:
Thanks for this article.
I am wondering if that was possible to Bypass the UAC validation message when using this method ?



Not from what I've seen. Guest Operations is subject to the in-guest security settings such as UAC.
0 # vpourchet 2013-11-14 11:05
Thanks for this article.
I am wondering if that was possible to Bypass the UAC validation message when using this method ?


0 # RAJESH 2013-11-14 04:43
Great Article. Thanks. Could u please post an article regarding creating a common CMDB for all deployments/del etions and modifications from VCAC irrespctive of the underlying hypervisor/phys ical machnies.


Book Shelf

Experts Exchange

NUC Lab Kit

Below are my thoughts for a vSAN nuc lab. Since I already have cables, not including them here. I ordered (and received by Nov 30, 2016)
3 x nuc, 3 x 32GB Crucial mem, 3 x Toshiba NVMe drive, 3 x Startech USB to GB NIC, and 3 x Crucial 1TB SSD. I've also been very happy with my Cisco SG300-10 so I bought one more since my existing one only has one port available. Each of the items listed here are linked below - all were purchased using the provided links below.
single NIC (See this post for details on using the USB -> GB NIC item listed below

I stayed with the i5 for the power consumption and form factor vs. the i7 Skull Canyon ;)