0

Onyx, the gem of VMware’s flings

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.

Onyx is basically a proxy application that sits between your vCenter server and your vSphere Client or PowerCLI. It intercepts the communication between the two and outputs the commands in the language of your choice. Options include the raw SOAP messages, C#, PowerCLI, and JavaScript for vRO.

output_mode_onyx

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.

connect_onyx

 

Enter the name of your vCenter server. Onyx should prepend the https://

connect_config_onyx

 

Open your vSphere client and connect to http://localhost:1545 (or the IP of the system running Onyx if not localhost)

vspher_client_connect_onyx

 

If you prefer to use PowerCLI, enter “Connect-VIServer localhost -protocol http -port 1545”

connect_powercli_onyx

Click Start in Onyx

start_onyx

Perform your action in the client or PowerCLI

power_on_vbeers_onyx

Onyx will display the script to perform the action!

power_on_script_onyx

Here’s the result of copying from Onyx to a PowerCLI script…

powercli_script_onyx

task_completion_onyx

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.

vro_module_add_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!!!

Matt Bradford

Leave a Reply