Kinney Group’s own Troy Wiegand hosts this video blog series, which will outline some simple tips for success with VMware vRealize Orchestrator. Join Troy as he applies his automation engineering expertise to shed some light on VMware!
An exciting upcoming feature for VMware is the capability to link lists to variables in VMware vRealize Orchestrator (VRO), a solution that creates workflows to simplify IT operations through automation. As we wait eagerly for that tool to be made available, we have a Kinney Group workaround that I’d like to share. This solution provides a user-friendly interface for running multiple operations on our Virtual Machines (VMs) at the same time.
Utilizing Dual Lists
Today, we’ll be using dual list input fields to select VMs in VMware. Starting within the workflow, go to “Edit” mode along the top banner and click “Run.” This will open the dual list field. Similarly to other selecting platforms, use “Shift” to select a range or “Control” or “Command” to select nonconsecutive items. The VRO interface considers anything on the right to be selected. Anything remaining on the left won’t be selected. By viewing the “Virtual Machines” page, you can then see that modifying the contents of each list in turn modifies the value for the input shown below.
Reviewing Your Script
Viewing the details of the script can help illuminate what exactly you’re inputting into the form. This view can be found within the source value; you can then click “Edit” on a value to get a bigger view. For all VMs in an array, take the name and insert it into a sorted array at the end of the script. Make sure the field includes “return result” to ensure the input populates correctly in the dual list.
Top KGI Tip: enter your commands in a while loop to keep track of work within asynchronous tasks!
Open the “Input Form” viewer. You’ll see we have one input. Instead of feeding a virtual machine array into this dual list, we’ll be feeding in a string of several VMs. To populate the Dual List pickers, go to “Values” on the right-hand side of the screen and select a source. I’ll be using the “External Source” field (shown here as the Default Value). Using a text field to view the input string, make sure your Value source is set to Compute a value and your operator is set to Concatenate in the “All VMs” field.
View your Script in Schema
Once the source is inputted, we can view the script in the Schema tab to undo the array formatting. Here you can choose either to use “allVms” or to select only certain VMs. Generally, we turn the visibility “off” for this field to ensure a cleaner visual experience. Save your changes before navigating to the “Run” tab.
The Moment of Truth
In the “Run” tab, click on “Virtual Machines” and select which inputs to use—then run the script! Use the “Logs” tab to see how the script is populating. As a result, we can see that VRO found an object for the selected fields. This solution has many applications, but we most often use it when running multiple operations on our virtual machines at the same time.
We hope you picked up some expertise for your VRO toolkit. Stay tuned for more VMware Orchestrator tips! In addition to handy automation workarounds like this one, you can expect posts on workflow execution and snapshot viewing in the future. In the meantime, fill out the form below to get in touch with automation experts like Troy: