WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
  • VKS
  • Homelab
    • Resources
    • Nested Virtualization
  • VMware Nostalgia
  • Apple

Heads Up: Workaround required for resxtop to function in vMA 5.5

11.14.2013 by William Lam // 2 Comments

If you are using the latest version of vMA 5.5, there is currently a known issue when using resxtop. After successfully logging into the ESXi host, the command prompt is returned immediately and resxtop is not actually loaded.

Here is a screenshot of the behavior:

I have received word from engineering there is a workaround that is required to get resxtop working, which is to run the following command:

sudo mv /usr/lib/vmware-rcli/lib/ /usr/lib/vmware

Once you have executed the above command (only required once), you now will be able to connect to your ESXi host using resxtop.

Engineering is working on getting the vMA release notes updated as well as a KB article published and we will have fix for this in the a sub-sequent update/patch release of vMA.

Categories // Uncategorized Tags // ESXi 5.5, resxtop, vcli, vMA 5.5, vSphere 5.5

Do I need to install both the vSphere CLI & vSphere SDK for Perl?

08.07.2013 by William Lam // 1 Comment

I received this question from one of our TAMs (Technical Account Managers) last week asking what is the difference between the vSphere CLI and the vSphere SDK for Perl and whether you need to install both of them. The simple answer is there is no difference, but why do we have two packages then? Well, this was probably due to how the vSphere SDK for Perl and the vCLI was initially introduced and was distributed in two separate packages.

Starting with the vSphere SDK for Perl 4.0, both the SDK packages and the vCLI commands have been combined together. However, it looks like both packages are still being produced as part of the automated build process and this will be consolidated in a single distribution in a future release. Going forward, you can just download the vSphere CLI which is always tied to a vSphere release and you will be ensured that is fully compatible with the latest release.

For more details behind each of the packages, you can take a look at the quick summary below:

vSphere SDK for Perl

The vSphere SDK for Perl is just a client-side Perl framework that provides administrators with a scripting interface to the vSphere API. As part of the SDK (Software Development Kit) it also provides a variety of sample scripts.

vSphere CLI

The vSphere CLI or the vCLI for short is just a set of command-line scripts that implements a sub-set of the functionality from the vSphere API. These scripts include the vicfg-* commands which are remote version of the legacy esxcfg-* commands, as well as ESXCLI, vmkfstools and resxtop commands that can also be run remotely. Most importantly, the vicfg-* commands are built on top of the vSphere SDK for Perl and this is one of the reasons you need to have the vSphere SDK for Perl installed if you wish to use the vCLI commands.

Categories // Uncategorized Tags // vcli, vSphere CLI, vsphere sdk for perl

Datastore File Management using vCLI vifs

03.09.2012 by William Lam // Leave a Comment

There are many useful scripts that are bundled with the VMware vCLI, one such script, that is not very well known is the vifs utility which provides datastore file management. When you right click on a datastore and browse using the vSphere Client, you can create a new folder, download/upload, delete and move files.

Using the vCLI's vifs utility, you can perform the same set of operations via the command-line and behind the scenes it uses the vSphere API fileManager to perform these operations. You can also browse datastore by just having access to a web browser, just point it to the following address: https://[ESXI_HOSTNAME]/folder and you can access the datastores by clicking through the links.

To browse the datastore using vifs, you will need vCLI installed on either a Windows/Linux system or you may use VMware vMA.

To browse a specific datastore for an ESXi host, you will need to first list the available datastores by using the following command: vifs --server [SERVER] --username [USERNAME] --listds

Once you have identified the datastore you are interested in, you will then use the --dir flag to list the contents of the directory and their sub-directories by using the following command: vifs --server [SERVER] --username [USERNAME] --dir '[DATASTORENAME]'

Note: The format of the datastore name must be in brackets '[datastorename]' which is how a datastore path is identified in the vSphere API. To list sub-directories, you will need a space between the datastore name and the directory name and do not forget to quote the parameter

Let's say you would like to download the .vmx configuration file for in the directory, you can use --get flag to by using the following command:

vifs --server [SERVER] --username [USERNAME] --get '[DATASTORENAME] somedir/somefile.vmx'

Note: In the example above, we are downloading the file in the current working directory denoted by the "." (period). If you wish to download it somewhere else or even renaming the file, you will need to specify the full path to the destination


If you wanted to automate the downloading of say all .vmx configuration files, it might be pretty tedious to run through the directory discovery, so here is a quick shell script called getVMVMX.sh that is more user friendly that allows you to easily download all .vmx configurations for a given datastore.

To use the script, you will need vCLI installed on either a Linux system or use VMware vMA and be sure to set the executable permission on the shell script. You will need to specify the credentials to the ESX(i) host and the specific datastore you wish to either "list" or "download" all .vmx configuration files.

Using the --listds flag, you will need to identify the datastore you wish to use. Next you will use the following command to "list" all .vmx configuration file: ./getVMVMX.sh [ESXI_SERVER] [USERNAME] "[PASSWORD]" [DATASTORE] list

To download all .vmx configuration file you will use the following command:

./getVMVMX.sh [ESXI_SERVER] [USERNAME] "[PASSWORD]" [DATASTORE] download [FOLDER]

where FOLDER is a directory that will automatically be created for you to store all .vmx configuration files

Note: You can easily modify the script to add an additional "for loop" at the beginning to automatically download .vmx configurations for all datastores. I will leave that as an exercise for the reader.

So if you ever need to grab a vmware.log file for a specific VM or upload an ISO to datastore, you can do so from the command-line using the vifs utility that is bundled with the vCLI.

Categories // Uncategorized Tags // ESXi 4.1, ESXi 5.0, ESXi 5.0, vcli, vSphere

  • 1
  • 2
  • Next Page »

Search

Thank Author

Author

William is Distinguished Platform Engineering Architect in the VMware Cloud Foundation (VCF) Division at Broadcom. His primary focus is helping customers and partners build, run and operate a modern Private Cloud using the VMware Cloud Foundation (VCF) platform.

Connect

  • Bluesky
  • Email
  • GitHub
  • LinkedIn
  • Mastodon
  • Reddit
  • RSS
  • Twitter
  • Vimeo

Recent

  • Programmatically accessing the Broadcom Compatibility Guide (BCG) 05/06/2025
  • Quick Tip - Validating Broadcom Download TokenĀ  05/01/2025
  • Supported chipsets for the USB Network Native Driver for ESXi Fling 04/23/2025
  • vCenter Identity Federation with Authelia 04/16/2025
  • vCenter Server Identity Federation with Kanidm 04/10/2025

Advertisment

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

Copyright WilliamLam.com © 2025