VMware Cloud Community
mijoedekock
Contributor
Contributor
Jump to solution

Stuck on workflow

I am stuck on a workflow I am trying to create.  I am looking to unmount the tools installer that gets left on VM's after the tools is upgraded.  (Mostly Linux VM's).  I have attached my workflow.  I am stuck on the custom decision.  I guess I need to find out how to properly get the workflow to check the VM for tools being mounted or not and properly define mount?

Thanks for any help!

Joe

VCP5 VCP4 MCSA 2008 MCSA 2012
Reply
0 Kudos
1 Solution

Accepted Solutions
Burke-
VMware Employee
VMware Employee
Jump to solution

If I were doing this, I would just add an exception handler rather than doing additional queries. You can do this as a try/catch within your script OR you can add a log element or scriptable task next to the element that has the potential to throw an exception, then mouse over that element and click on the red arrow (assuming vCO 5.1 here) and drag the exception route to the log element, binding the errorCode to its input, then have that element just continue the loop.. that way:

Each VM that does not have the tools mounted will just log a note and allow the loop to continue :smileygrin:

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 vRealize Orchestrator tips and tutorials - @TechnicalValues on Twitter

View solution in original post

Reply
0 Kudos
6 Replies
Burke-
VMware Employee
VMware Employee
Jump to solution

Your script in the "Need to Unmount" element uses "mount", but your incoming variable is "Mount" -- case sensitive Smiley Wink

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 vRealize Orchestrator tips and tutorials - @TechnicalValues on Twitter
mijoedekock
Contributor
Contributor
Jump to solution

Thanks Burke!  You got me past that point!

Now when it runs its throwing an error at the unmount tools script.  "fault.InvalidState.summary".  Can you steer me in the direction of what I need to do here?  Apparently somewhere in this process I need to get the workflow to "poll" the VM it gets at the "Pick a VM" script to see if it has the tools mounted?

Thanks!

Joe

VCP5 VCP4 MCSA 2008 MCSA 2012
Reply
0 Kudos
Burke-
VMware Employee
VMware Employee
Jump to solution

If I were doing this, I would just add an exception handler rather than doing additional queries. You can do this as a try/catch within your script OR you can add a log element or scriptable task next to the element that has the potential to throw an exception, then mouse over that element and click on the red arrow (assuming vCO 5.1 here) and drag the exception route to the log element, binding the errorCode to its input, then have that element just continue the loop.. that way:

Each VM that does not have the tools mounted will just log a note and allow the loop to continue :smileygrin:

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 vRealize Orchestrator tips and tutorials - @TechnicalValues on Twitter
Reply
0 Kudos
tschoergez
Leadership
Leadership
Jump to solution

See some examples how to deal with excaptions in loops here: http://communities.vmware.com/message/1732525

Cheers,

Joerg

mijoedekock
Contributor
Contributor
Jump to solution

Burke... you did it again!  Attached is my final workflow.  Worked great!  Smiley Happy

Thanks again!

VCP5 VCP4 MCSA 2008 MCSA 2012
Reply
0 Kudos
mijoedekock
Contributor
Contributor
Jump to solution

This is a great read.  Thanks for sharing this.  I am going to dig into it!

Thanks!

VCP5 VCP4 MCSA 2008 MCSA 2012
Reply
0 Kudos