VITAVMware

Installing VMware vCLI on Ubuntu Desktop

In this post I’ll walk through installing the vSphere vCLI on an Ubuntu desktop to enable remotely running esxtop, vicfg commands, and esxcli commands on ESXi hosts.

In the past I have done a lot of tinkering on the VMA, one of the most useful utilities was resxtop, which allows you to remotely run esxtop to assist in troubleshooting performance of an ESXi host. Since the vSphere Management Assistant (VMA) has been depreciated, the vSphere vCLI can be installed on a Windows or Linux machine to provide most of the functionality which was available in the VMA.

By using the resxtop command with the vCLI you do not have to enable SSH on the host. The last build of the VMA I believe you could get was for 6.5, and in that one I was never able to get resxtop to work. The resxtop utility is included as part of the vSphere vCLI.

You can download the vSphere CLI for vSphere 6.7 from here

From a VNC connection to my Ubuntu desktop I open terminal (you could do this over SSH and the same process works using SSH with Ubuntu server as well):

Update apt-get:
sudo apt-get update

Install the pre-reqs for vSphere CLI for vSphere 6.7:
sudo apt-get install lib32z1 lib32ncurses5 build-essential uuid uuid-dev libssl-dev perl-doc libxml-libxml-perl libcrypt-ssleay-perl libsoap-lite-perl

Download vSphere CLI for vSphere 6.7 and unzip/untar the package:
tar zxvf VMware-vSphere-CLI-6.7.0-8156551.x86_64.tar.gz

Run the installer:
sudo ./vmware-vsphere-cli-distrib/vmware-install.pl
You will have to accept the EULA. Then the installer will automatically install any perl modules which are missing. It will then ask you where to place the executables, I chose the default (/usr/bin).

Once the installer completes I am able to run resxtop against one of my ESXi host from the Ubuntu desktop:
resxtop --server labesx1.lab.local --username root

I am connecting directly to the ESXi host with resxtop, but I could authenticate through vCenter by replacing the –server with the vCenter Server managing the host and using the –vihost option with the inventory name of the ESXi host. For example:
resxtop --server vcenter.lab.local --vihost labesx1.lab.local --username administrator@vsphere.local

To run esxcli commands the ESXi host thumbprint has to be trusted. I have to add the ESXi host’s thumbprint to the credential store before I can run esxcli commands.
./vmware-vsphere-cli-distrib/apps/general/credstore_admin.pl add --server --thumbprint
credstore_admin.pl utility also replaces some of the fastpass functionality which was available on the VMA.

Once the thumbprint is added using credstore_admin.pl I can run esxcli commands against the host.

There is also a vCLI package for Windows, unfortunately resxtop does not work with the Windows install. 🙁

Still bummed VMware deprecated the VMA appliance, but this helps…

I know it has been a long while since I last posted, I’ll try to do better, I promise, maybe.

3 thoughts on “Installing VMware vCLI on Ubuntu Desktop

  • Andrea

    credstore_admin.pl is located in /usr/lib/vmware-vcli/apps/general/credstore_admin.pl but doesn’t have a soft link into default /usr/bin like the rest of the tools.

    Reply
  • wazzaguy

    if lib32ncurses5 doesn’t install, try; apt-get install libncurses5:i386

    Reply
  • getting a unable to locate package for the libncurses5:i386 and also when i leave off the i386, any ideas?

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

twenty − two =