Tag Archives: onyx

Onyx For the Web Client now supports vSphere 6.0 U1

It’s been a while since I’ve used the Onyx VMware Fling.  The last time I used it was way back in 2013 running the Project Onyx version that sat as a proxy between the C# vSphere Client and vCenter.  It was a great little Fling back then.  I had a good laugh when I looked at one of my old blog posts about Project Onyx and how I felt its lifespan was limited due to the C# client being phased out for the Web Client.  Two years later and the C# vSphere Client is still going strong.  Com’on VMware, do it already 😛

Well, Onyx is now back in an all new way and it now supports the vSphere Web Client.  In fact it was released back in July 2015 but has just undergone another update for vSphere 6.0 U1.  If you’re not sure what Onyx is.  It’s a tool that allows you to record your vSphere Client actions and display them back as PowerCLI API method calls.  I found Onyx useful in years past when the PowerCLI cmdlets weren’t as mature as they are today.  Thought, today there’s still a lot of things you can’t do with the standard PowerCLI cmdlets and recently I’ve been finding I’ve been delving into the API methods more and more.  So it’s great to see support for the Web Client in Onyx now.

There are two versions of Onyx For the Web Client.  The 6.0 release and the 6.0 U1 release.  It’s important that you use the version matching your vSphere.  I learnt the hard way recently how dangerous VMware Flings can be.  I installed the 6.0 release onto vSphere 6.0 U1 and broke my vCenter good and proper.  With the latest release of Onyx only a few weeks back it now once again supports the latest vSphere Web Client.

Installation is quite simple.  In my case I’m installing to the vCenter Server Appliance (VCSA).  You download the Onyx Fling from here.  Then extract its contents to a local folder.

I then console into my VCSA and enable and change my shell to BASH

shell.set --enabled True
chsh -s /bin/bash

I can now use SCP to copy the files from my local computer to the VCSA using WinSCP.  It’s just a matter of dragging the onyx-setup-60u1 folder from my computer the to the /root directory on the VCSA.


Now back on the VCSA I run

cd /root/onyx-setup-60u1
chmod +x ./install.sh

When the install script completes it will restart your vCenter web services.  It will take a few minutes to fully restart so don’t panic if you start receiving errors when trying to browse to the Web Client.  Once the services completely restart make sure you have closed you web browser tab and reopen it to the Web Client.

It’s also ideal to change the shell back to the Appliance Shell

chsh -s /bin/appliancesh


Using Onyx is super simple.  It can be found under the Inventories in the Web Client.  Also pinned to the top right corner you have to two buttons.  A Red Record icon and a PowerCLI button.  Pressing the Red Record button starts recording your web session interactions.


When you’ve completed with you actions we click the same record button which has turned to a Stop button.  Pressing the PowerCLI button now shows us the PowerCLI API calls that took place to perform our actions.  All cleanly laid out with syntax highlighting.  There’s also the ability to save the output as a PowerCLI script.

That’s it really.  There’s not a great deal to this Fling.  If you don’t do much PowerCLI you might not find this Fling overly special.  If on the other hand you are using PowerCLI on a regular basis I’m sure you’ll find it interesting.

Word of warning; Onyx For the Web Client is a VMware Fling and as such does not come with official VMware support.  Onyx is best suited to a Dev and Test environment and is not really recommended for Production environments.

Onyx For The Web Client

Onyx 101

It’s been a week now since I’ve been playing with Onyx.  I stand by my initial impressions that it’s a great little app.  If you’re into automation, and lets face it, who isn’t these days.  You should really give Onyx a looking into.  Now it’s not going to write any scripts for you.  But what it’s going to do is give you the core code of your actions in the vSphere Client.

I’ve had Onyx running in the background behind my vSphere Client for the past week.  What I found interesting, or depressing, was looking at the same code pop up in the background as I did the same repetitious tasks in the vSphere Client.  A lot of my repetitious actions could be condensed into a handful of lines of PowerCLI code.  All that was stopping me was a copy and paste from Onyx into a PowerCLI script.

As I start focusing more on PowerCLI I can myself referring to Onyx to help cut some of the guess work out of what commands I need to be running to achieve my objectives.  As i said, it’s not going to write a script for you, but it’s going to give you a  good head start.

Below are the steps to get started with Onyx.

Once you download the ZIP file uncompress it to a folder.  Locate Onyx.exe in the root of that folder and execute it.  No installation is required.

A small window will open. You can click on the blue cog and change the default settings (which are fine to initially start with) and then click on the orange asterisk in the top left corner.


This will open a connection window.  Type in the vCenter URL.  You can leave off the HTTPS if you wish and Onyx will insert it for you.

To simplify the process of connecting to the Onyx proxy with the vSphere Client click the checkbox to ‘Launch a client after connected‘.

Select VMware VI Client from the dropdown menu.  Then enter in your standard login credentials to vCenter and click Start.


The vSphere Client will start up and make a connection to the Onyx Service on your PC using the credentials you entered on the previous screen.  A warning will pop up stating that your connection is not encrypted and if you want to proceed.  Click Yes to continue.

It’s worth noting that the connection between Onyx and vCenter is still encrypted.  What’s not encrypted is your local proxied connection from the Sphere Client to Onyx.  For Onyx to see you actions from the vSphere Client it needs an unencrypted session.


If all successful up to this point your vSphere Client will connect to vCenter.  You’ll also see that the Onyx window will show a black screen and will say it’s connect to your vCenter on port 443 and running at your PC.


Now all we have to do is select our Output Mode, in this case, PowerCLI.  Then click the green play button on the top left.

As we perform actions in the vSphere Client they will be translated to code.  Below is the PowerCLI output from creating a new Resource Pool.


Below is the equivalent code but for VMware Orchestrator in JavaScript.


And that’s it.  You can copy and past code out by right click on the code.  You can also use the save button to save all the output to a file.

Reference Links

Project Onyx Fling

Project Onyx

In keeping with my recent VMware Flings interest, Onyx, has been another one of those Flings that’s caught my eye.  The name probably accounts for 50% of my interesting—Onyx—just sounds so cool.  It sounds like it stands for something important.  The geek I am I actually looked it up.  It’s Greek, meaning claw or fingernail.  eh, ok so not that cool now.

Onyx is an application that can generate output code based on your actions in the vSphere C# client.  It can generate four different types of output --Raw Soap Messages, C#, PowerShell, and vCO JavaScript.  It achieves this by setting itself up as a proxy between you and the vCenter Server.  So Onyx initiates a secure connection to the vCenter server and then you initiate a connection using the C# vSphere Client to Onyx.  From that point on everything becomes transparent to you.  You can continue to use the vSphere Client to manage vCenter as normal.  But now you have the ability to create scriptable code from your actions.

Onyx is designed to work only with the C# Client.  It does not work with the Web Client.  With the push to  the Web Client and no more C# clients in development.  This may mean that Onyx now has a finite lifespan to it.

In any case I plan on playing around with Onyx over the coming days.  To goal is to see if I can extract meaningful PowerCli and vCO output code to use.  As I spend more time with these products on a day to day basis I can see Onyx helping, or at least guiding me into the right direction, when stuck creating workflows and scripts.

Onyx can be found on the VMware Fling page.  There is also a VMTN community which has been created for Project Onyx.  Both of which can be found in the links below.


Reference Links

Project Onyx Fling
Project Onyx Community