What is the difference between esxcli commands and localcli command?
Resolution
Esxcli is the standard command-line tool for managing ESXi hosts. It communicates with the host's management stack (hostd) and is suitable for both local and remote management. However, localcli is a lower-level tool that bypasses hostd and interacts directly with system APIs. It is intended for troubleshooting situations where hostd is unavailable or unresponsive as it bypasses normal management processes.
Example:
[root@esx-02a :~ ] time esxcli real 0m 0.49s user 0m 0.38s sys 0m 0.00s
[root@esx-02a :~ ] time localcli real 0m 0.20s user 0m 0.16s sys 0m 0.00s