VMware Cloud Community
SteveR123
Enthusiast
Enthusiast

vCO/vRO wait for a service?

Hi! I'm trying to work out a suitable method to wait for a script to finish. I'm using 'run program in guest' to run a script on a VM which in turn triggers a CHEF-Client install. It's working well but its a "fire and forget" situation which isn't ideal, as I'd like to send a notification when it's completed. If I could wait for a service to be installed/started maybe, I could then notify the user when the install is complete. It takes approx 10 mins for the install to complete, but i'd rather not just use a wait timer in minutes.

Thanks for any advice on this one as always

Cheers

Steve

4 Replies
jarushepic
Enthusiast
Enthusiast

Have a look at the guest script manager package:

Guest script manager package

I've sense moved away from the guest operations since I haven't found them very reliable.  I tend to use SSH or Powershell.

SteveR123
Enthusiast
Enthusiast

Thanks, I have seen the Guest script manager package but not sure how to wait/query a service or process to be honest, i'll look into it furher. I've actually moved from PShell to a combination of the guest agent and vRO.

Cheers

Steve

Reply
0 Kudos
mcfadyenj
Hot Shot
Hot Shot

you can use the businessState property to pass workflow state back into the workflow and validate it via a workflowExecution polling action.

this would required your powershell script to set the state of the workflowExection.businessState property

qc4vmware
Virtuoso
Virtuoso

The guest script manager allows you to set a timeout and it will poll the state of the script.  It will return error codes and any output from the script.  It works like a charm for me.  I heavily leverage it.