A very long time ago I wrote about Onyx for vSphere. At that time there wasn't any vSphere web client, but the magic to see Onyx in action was impressive. First thing you might ask if you're not old school or if just starting with VMware virtualization technologies is What is Onyx? It's simple. Onyx for vSphere Web client allows to automatically transform the tasks you perform within the UI of the web client into PowerShell commands! It's kind a magic, especially for “non scripting” guys (like me..) … where you get your script done in no time.
Once you have that code, with a little effort you can enhance it, to personalize, to adapt to your needs. And then, you just save it as a powershell script for later usage. Alan Renouf has done an excellent job by recording a video of how the things works.
Note that there are two separate downloads. Two versions of Onyx where the first one is for vSphere 6.0 and the second one is for vSphere 6.0 U1. Make sure you download the version which match your environment. Inside of the zip package you'll find the manual telling you exactly how to install it and which are the requirements and best practices.
Two different guides are provided as well:
- For vCenter server appliance (VCSA)
- For vCenter server on Windows
Quote from the Admin guide:
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.
If you're planning to test it make sure that you follow the installation guide which shows you also how to uninstall. In fact the product replaces some of the vSphere web client's files so actually it's recommended to use this tech preview Fling only in test or dev environments.
In my case I also wanted to test the Onyx so what I did is I backed up my vCenter server (Windows) and then only I launched the installation script which I previously copied to the c: drive of my Windows VM. Note the big warning before the installer starts…
The installer then stops the vSphere web client service and other vCenter services too…
I quickly tested the solution and added an additional NIC to one of my nested ESXi VMs…. then you have an option to save the script as a *.PS1 file on the desktop…
The VCSA guide is similar, but you have to use an SCP compatible client to copy the installer into the VCSA. If you're fine with that, then you just follow the detailed guide you'll find in the PDF. Here is the video from Alan Renouf which shows how it works and some of the possibilities for customization.
Check the Onyx for vSphere Web client Download Page here.
Source: VMware blog