Blue glowing high energy plasma field in space, computer generated abstract background
Customer Voice

Fling Contest 2014 Winner: Onyx for the Web Client

Brian-Graf_avatar-68x68About Brian Graf
Brian Graf is a Senior Technical Marketing Manager – Automation in the Cloud Infrastructure Technical Marketing group at VMware. Brian currently focuses on all of the vCloud Suite products as well as the Software-Defined Data Center. Previous to Technical Marketing, Brian worked as a Consultant for EMC Consulting. His main focus was Data center migration methodologies and implementations. His background previous to VMware includes Operations Engineering, Virtualization, Business Intelligence, and Exchange/Blackberry Engineering. Get notification of new blog postings and more by following Brian on Twitter: @vBrianGraf







I am pleased to announce that we have just released Onyx for the Web Client! For those of you who already know what Onyx is, you are probably already doing a victory dance at your desk. Onyx has proved its popularity in the past, with the only hurdle being that it could only be used with the C# client. That is no longer the case– as of today, you can download Onyx for the Web Client and be running in minutes!

What is Onyx?

Onyx for the Web Client is a Fling that enables Developers and System Admins to gain access to example PowerCLI.Net code for actions taken in the vSphere Web Client. This Fling was the winning entry in last year’s 2014 Fling Contest. It’s an update, of sorts, to the Onyx fling, as it allows for similar functionality in the web client.

The Onyx for the Web Client Fling provides the ability to record actions taken in the vSphere Web Client and turn these actions into PowerCLI.Net code helping Developers and System Administrators by providing sample code which shows how an action was taken, and gives the basis for code to be re-used in better defined functions, or for sample code to be used in search engines to find the API documentation and information on how to use this area of the vSphere API.

Why is Onyx Important?

PowerCLI is a very robust automation tool, created for administrators to work within their virtual environments. Although PowerCLI has almost 500 cmdlets that support more than 10 products and technologies, we realize that there are situations within given environments and use-cases where there is not a specific cmdlet that will perform the actions required. In such cases, PowerCLI has the ability to allow administrators to work directly with the vSphere API, allowing them to create additional actions and commands that otherwise don’t exist in PowerCLI.

At this point, Onyx can then be used, allowing users to record actions performed in the vSphere Web Client, and output the underlying API calls. These can then be saved and edited, allowing users maximum flexibility without requiring a deep understanding of the vSphere API.

Up until vSphere 5.5, users could leverage the original Onyx Fling with the C# client. When vSphere 5.5 was released, there was certain functionality that was only found in the vSphere Web Client. Therefore, users were unable to work with the vSphere API calls using Onyx that were taking place (mainly around VSAN and Distributed Networks). Now, using this new Fling, users will be able to work with all the Public vSphere API functionality placed in the Web Client.

What are the Requirements?

Onyx for the Web Client requires the vSphere Web Client Version 6.0.0 Build 2559277 as installed as part of vCenter for Windows or vCSA.

How do I Install Onyx?


Open the VCSA Console.

Screenshot 2015-07-13 10.29.47

Login to the VCSA and go to ‘Troubleshooting Mode Options’.

Screenshot 2015-07-13 10.30.04

Enable BASH Shell and Enable SSH. Both options should appear like the image below.

Screenshot 2015-07-13 10.33.18

Use a tool such as WinSCP to login to the VCSA. Enter the Hostname and Credentials, then click ‘Advanced’.

Screenshot 2015-07-13 10.44.22

Select ‘SFTP’ and type the following in SFTP server: shell /usr/lib64/ssh/sftp-server

Screenshot 2015-07-13 10.44.30

Login to vCenter. Continue past the Authentication Banner.

Screenshot 2015-07-13 10.44.50

Unzip the Onyx setup folder and upload ‘onyx-setup’ to the /root/ folder.

Screenshot 2015-07-13 10.56.54

Open Putty and connect to vCenter

Screenshot 2015-07-13 11.01.35

First, enable BASH access by typing: ‘shell.set –enabled true

Launch BASH by typing: ‘shell

Screenshot 2015-07-13 11.02.32

Change directories to /root/onyx-setup/

Type: ‘chmod +x ./’ to make the file executable.

Screenshot 2015-07-13 11.03.36

Run ./

Screenshot 2015-07-13 11.03.43

Type: ‘y’ to continue the installation.

Screenshot 2015-07-13 11.03.49

After the install script runs, the vSphere web client will restart. Once the restart has finished, you will be ready to use Onyx.

Screenshot 2015-07-13 11.04.15

Windows vCenter Server

To install Onyx on a Windows vCenter, unzip the Onyx installer.

Right-click Powershell and select ‘Run as Administrator’.

Type: ‘Set-ExecutionPolicy RemoteSigned

Type: ‘y

Screenshot 2015-07-13 12.06.30

Run the install script. Change the directory to the unzipped install files.

Run .install.ps1

Screenshot 2015-07-13 12.06.58


How Do I Use It?

Once Onyx is installed, you will see a few new icons. The Onyx icon is in the left-navigation pane, under ‘Inventories’ on the home screen, and in the top-right of the screen next to the search box.

There is a red RECORD button next to the Onyx icon. When you are ready to record an action, click the record button. It will turn into a STOP button. Do not click this until you are finished recording the action(s).

Perform the tasks in vCenter and click stop. Onyx has recorded your actions. Click the Onyx icon to see the code.


Screenshot 2015-07-08 15.53.55

You will now see all of the recorded PowerCLI.NET code. You can search through it using the textbox and search button.

Screenshot 2015-07-08 16.00.03

To work with the recorded code, click the SAVE button and save it to your local machine.

Screenshot 2015-07-08 16.00.03 - Copy

To start over or to erase the recorded code, click ‘Clear’. You will need to confirm this action. Select ‘Yes’.

Screenshot 2015-07-08 16.01.35

Onyx is now clear, and you can start over.

Screenshot 2015-07-08 16.01.37


Once you have your Onyx recording, you can use a PowerCLI editor of your choice to tweak the code to your needs. Stay tuned for more posts on Onyx and what it can do for you.

Where to Get Onyx

You can download the latest version of Onyx for Web Client from the VMware Flings site HERE:

Make sure to download and read through the documentation to ensure proper installation.