Recently, while I was listening to one of the VMworld sessions, I came across a brilliant fling called Onyx for the Web Client, but I like to call it Onyx vSphere Web Client.
Onyx for the Web Client is a Fling that translates actions taken in the vSphere Web Client to PowerCLI.Net code.
And if you are interested in listening to this year’s VMworld talks, head over to the GitHub page of William Lam, who has created a nice page which will let you download all the sessions and listen to them in your free time.
Coming back to the topic, as I said earlier, Onyx is the tool that is going to convert any action that you perform in the vSphere Web Client into PowerCLI code.
You can imagine what the use cases can be, for a newbie, it will be really helpful in understanding how PowerCLI works.
And for the veterans, they can take this code and understand how VMware implements the clicks on the Web Client and can be used to create advanced functions.
Once you head to the flings website, you will notice that there are three different download files available, be sure to download the correct ones as per your vCenter Server/Appliance version.
In my case, my vCenter Server/Appliance is running 6.o Update, so I have downloaded the appropriate files.
WARNING: This fling replaces core Web Client files and may cause issues with stability and patching of future versions of the web client, please only continue with this installation if you are using a test or dev environment.
Now that we understand that this is recommended to be used only in Test environments, let us see how to install the tool.
Installing Onyx vSphere Web Client
We will first take a look at installing it on a Windows vCenter Server and then the vCenter Server Appliance (VCSA)
Installing Onyx vSphere Web Client in Windows Server
The downloaded file will be in a zip format, extract the bundle and copy the folder to the vCenter Server.
Open a PowerShell prompt as navigate to the directory where you have saved the files.
Change directory to the folder that was copied and execute the install.ps1 file from there.
You can see the installation completed successfully, the installer as part of the installation Stopped the Web Client Service.
It then performed some changes to a couple of files, installed the plugin and started the Web Client and other dependent services.
Installing Onyx vSphere Web Client in VCSA
If you are using VCSA in your environment, then you would have to copy the same folder to the appliance using a program like WinSCP.
Note: Make sure that you BASH Shell and SSH enabled on the VCSA
Open the WinSCP program and provide the IP Address/FQDN of the VCSA and click on the Advanced and add the following under the Shell settings.
Once you connect successfully, transfer the folder to the /tmp/ directory on the appliance.
Now, let us take an SSH session to the appliance and install the Onyx vSphere Web Client plugin.
Change directory to the folder that was uploaded and give appropriate permissions by running the below command on the install.sh, script.
chmod +x ./install.sh
And finally execute the script and it will start the installation of the Onyx plugin.
Once completed, let us log in to the vSphere Web Client to take a look at how it works and what it can provide us in the form of code.
There are few places that you would see the icon of the Onyx plugin as seen below.
If you click on the Red Button on top of the screen, Onyx starts doing its magic and provides an output in the form of PowerCLI code.
Now, I can go ahead and show you an example, but I am not going to do that. Instead, I am embedding a YouTube video created for demo purposes by none other than Alan Renouf, who is the Product Manager for PowerCLI at VMware.
I hope you found this post informative and thank you for reading!