VMware Cloud Community
Kagome
Enthusiast
Enthusiast

Waiting event - how to create the trigger

Hello,

i'm working on a Workflow which is basicly cloning a VM and after that doing some GuestCustomization via the GuestSpecification.

I'm at a point where i want to 'catch' the VcCustomizationSucceeded - Event (if i'm correct here)

https://www.vmware.com/support/orchestrator/doc/vco_vsphere50_api/html/VcCustomizationSucceeded.html...

i see in the vsphere Client in the "Events" of the cloned VM 2 Events.

- 1 is saying that guestcustomization is starting

- 1 is saying that the guestcustomization is finished.

So my Idea was, that I use in the Workflow the "Waiting event"-element.

This elemnt requiers a Trigger - but how do I setup the Trigger?

i was looking arround and found somewhere VcEventManager-Class with a 'createTrigger' Method - yay

https://www.vmware.com/support/orchestrator/doc/vco_vsphere50_api/html/VcEventManager.html#createTri...

but hell i have no clue how to set the correct parameters. Ok the parameter 'timeout' is easy - but how do I tell that method that I want the event from my clonedVm with that special Event?

Maybe someone can help me please.

0 Kudos
2 Replies
cdecanini_
VMware Employee
VMware Employee

The trigger you have found belongs to the vSphere API whereas vCO is expecting a vCO trigger Smiley Sad

These vCO triggers needs to be developped as part of the plug-in. This is not the case for this one (vC plug-in has some VM power, gauges triggers).

What you need to use is the vim3waittaskEnd action in the library that will monitor the task until it finishes (if the guestCustomization is returning a task). Other wise you will need one of the wait action for the tools to come up.

Christophe.

If my answer resolved or helped you, please mark it as Correct or Helpful to award points. Thank you! Visit http://www.vcoteam.info & http://blogs.vmware.com/orchestrator for vCenter Orchestrator tips and tutorials - @vCOTeam on Twitter
Kagome
Enthusiast
Enthusiast

hello, thank you for your answere..

the task in vsphere ends within 1 second - but the customization needs around 5 - 10 minutes with multiple reboots.

i will simple set a waiting timer for 15 minutes and after that time Periode check if the VMWare-Tools are running.

0 Kudos