We’ve had a number of projects at work that have forced me to dig in to vRealize Orchestrator more than I have in the past. Typically, I’d be writing PowerCLI scripts, but having hundreds of disparate scripts can eventually become too much to manage. I’m also looking to learn something new and vRO seems to fit the bill. Brian Watrous’ educational videos on vRealize Orchestrator are essential to getting started, but what then?
Last week I had my eureka moment with vRealize Orchestrator, and I couldn’t have done it without project “Onyx“. You can grab your copy over at VMware flings site. Flings is an amazing collection of tools that VMware’s engineers have cooked up over the years but haven’t been fully adopted in their official releases. Yet, VMware is kind enough to make these projects available under their technical preview agreement.
To start using Onyx, simply extract the .zip and execute onyx.exe. Once you’ve accepted the EULA and the application has launched, click Connect.
Enter the name of your vCenter server. Onyx should prepend the https://
Open your vSphere client and connect to http://localhost:1545 (or the IP of the system running Onyx if not localhost)
If you prefer to use PowerCLI, enter “Connect-VIServer localhost -protocol http -port 1545”
Click Start in Onyx
Perform your action in the client or PowerCLI
Onyx will display the script to perform the action!
Here’s the result of copying from Onyx to a PowerCLI script…
Sure, you could condense it down to “Start-VM vBeers” but that’s not the point. I love PowerCLI because there’s are so many great examples to pull from with a simple Google search. Unfortunately that’s not always the case with vRO, and that’s where Onyx becomes indispensable.
There is a little bit of prep work that needs to be addressed before simply pasting scripts from Onyx to vRO, but the steps are well documented in the included readme. It essentially entails importing a small script into a module named com.vmware.onyx.
Though I find myself manipulating Onyx’s scripts to fit my vRO needs, Onyx offers a real nice alternative to sifting through API documentation. Best of all Ignat and Yavor are providing regular updates to Onyx; the last update being 14 days prior to the writing of this article. Nice work guys and thank you for such a great tool!!!