Just a small ESXi Pro tip this time. I recently had a host that was experiencing issues and the management services were unresponsive. This is a major problem for troubleshooting as the esxcli commandset won’t work anymore at this stage.

Now by accident I came across a tip from the Getting Started with vSphere Command-Line Interfaces documentation over at the VMware {code} website.

On the overview of vSphere Command-Line Interfaces the various methods of managing a host are explained. And as most of you will recoginise the majority of these methods use the API. There are however some exceptions and for this article I’d like to specifically point out localcli.

WARNING!

The use of this tool comes with a big disclaimer. You should only use this tool for troubleshooting purposes and NOT to make changes to the configuration of a host as this can lead to an inconsistent system state.

At first glance the command seems to support the complete list of namespaces available in esxcli.

Usage: localcli [disp options] <namespace> <command>

For help please run localcli --help

Available Namespaces:
  device                Device manager commands
  elxnet                elxnet esxcli functionality
  esxcli                Commands that operate on the esxcli system itself
                        allowing users to get additional information.
  fcoe                  VMware FCOE commands.
  graphics              VMware graphics commands.
  hardware              VMKernel hardware properties and commands for
                        configuring hardware.
  iscsi                 VMware iSCSI commands.
  network               Operations that pertain to the maintenance of
                        networking on an ESX host. This includes a wide
                        variety of commands to manipulate virtual networking
                        components (vswitch, portgroup, etc) as well as local
                        host IP, DNS and general host networking settings.
  nvme                  VMware NVMe driver esxcli extensions
  rdma                  Operations that pertain to remote direct memory access
                        (RDMA) protocol stack on an ESX host.
                        sched VMKernel system properties and commands for
                        configuring scheduling related functionality.
  software              Manage the ESXi software image and packages
  storage               VMware storage commands.
  system                VMKernel system properties and commands for
                        configuring properties of the kernel core system and
                        related system services.
  vm                    A small number of operations that allow a user to
                        Control Virtual Machine operations.
  vsan                  VMware vSAN commands

I only used localcli to do a few harmless checks. And when I knew for sure there’s no way I was going to recovery this host myself I decided to wait for VMware Technical Support to contact me.


Rudolf Kleijwegt

I am an experienced IT professional with over 20 years of hands-on experience designing, deploying, and maintaining IT infrastructure in both enterprise and service provider environments. My skills span across Linux and Windows and a multitude of server applications, allowing me to excel in a wide range of IT roles. Currently, my primary focus is on Software Defined DataCenter and DevOps. I am passionate about staying up to date with the latest trends in the industry to achieve superior outcomes.

0 Comments

Leave a Reply

Avatar placeholder

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