ESX Virtualization

VMware ESXi, vSphere, VMware Backup, Hyper-V... how-to, videos....

Nakivo Backup and Replication - #1 Backup solution for Virtual, physical, cloud, NAS and SaaS

Menu
  • Certification
      • VCP-DCV vSphere 8
          • vcp2024-125.
        • Close
    • Close
  • VMware
    • Configuration Maximums
    • vSphere
      • vSphere 8.0
      • vSphere 7.0
      • vSphere 6.7
      • vSphere 6.5
      • vSphere 6.0
      • Close
    • VMworld
      • VMware EXPLORE 2024
      • VMware EXPLORE 2023
      • VMware EXPLORE 2022
      • VMworld 2019
      • VMworld 2018
      • VMworld 2017
      • VMworld 2016
      • VMworld 2015
      • VMworld 2014
      • VMworld 2013
      • VMworld 2012
      • VMworld 2011
      • Close
    • Close
  • Microsoft
    • Windows Server 2012
    • Windows Server 2016
    • Windows Server 2019
    • Close
  • Categories
    • Tips – VMware, Microsoft and General IT tips and definitions, What is this?, How this works?
    • Server Virtualization – VMware ESXi, ESXi Free Hypervizor, VMware vSphere Server Virtualization, VMware Cloud and Datacenter Virtualization
    • Backup – Virtualization Backup Solutions, VMware vSphere Backup and ESXi backup solutions.
    • Desktop Virtualization – Desktop Virtualization, VMware Workstation, VMware Fusion, VMware Horizon View, tips and tutorials
    • How To – ESXi Tutorials, IT and virtualization tutorials, VMware ESXi 4.x, ESXi 5.x and VMware vSphere. VMware Workstation and other IT tutorials.
    • Free – Free virtualization utilities, ESXi Free, Monitoring and free backup utilities for ESXi and Hyper-V. Free IT tools.
    • Videos – VMware Virtualization Videos, VMware ESXi Videos, ESXi 4.x, ESXi 5.x tips and videos.
    • Home Lab
    • Reviews – Virtualization Software and reviews, Disaster and backup recovery software reviews. Virtual infrastructure monitoring software review.
    • Close
  • Partners
    • NAKIVO
    • StarWind
    • Zerto
    • Xorux
    • Close
  • This Web
    • News
    • ESXi Lab
    • About
    • Advertise
    • Archives
    • Disclaimer
    • PDFs and Books
    • Close
  • Free
  • Privacy policy

Essential VMware CLI Commands for Troubleshooting VMware vSphere Infrastructure

By Vladan SEGET | Last Updated: July 14, 2023

Shares

VMware vSphere is a powerful virtualization platform used by organizations to run and manage their virtual infrastructure. While the vSphere web client provides a user-friendly interface for managing virtual machines and hosts, there are times when troubleshooting requires a deeper level of access and control. In such cases, the VMware Command-Line Interface (CLI) becomes an invaluable tool. In this blog post, we will explore some of the most useful VMware CLI commands that can aid in troubleshooting VMware vSphere infrastructure.

In the past, I have wrote some blog posts about useful CLI commands and you might be interested in those. Let's have a look here:

  • ESXi Commands List – Getting started
  • ESXi CLI Networking commands
  • ESXi Commands List – Snapshot Deletion Monitoring
  • ESXi Commands List – Storage

As you can see, the esxcli command is a versatile and powerful command-line tool that provides access to various aspects of the ESXi host or vCenter. It allows you to perform a wide range of tasks, including network configuration, storage management, and performance monitoring. Some essential esxcli commands for troubleshooting include:

  • esxcli network – Provides network-related commands such as listing network interfaces, configuring VLANs, and troubleshooting network connectivity.
  • esxcli storage – Allows you to manage storage devices, view storage information, and troubleshoot storage-related issues.
  • esxcli system – Provides system-related commands such as managing services, checking hardware health, and monitoring system resources.


The vim-cmd command is another powerful tool that allows you to interact with the vSphere API and perform various operations on virtual machines and hosts. It is particularly useful for managing virtual machines and troubleshooting issues related to them. Some essential vim-cmd commands for troubleshooting include:

  • vim-cmd vmsvc/getallvms – Lists all virtual machines along with their IDs, names, and power states.
  • vim-cmd vmsvc/power.on <vmid> – Powers on a virtual machine with the specified ID.
  • vim-cmd vmsvc/device.getdevices <vmid> – Retrieves information about the devices attached to a virtual machine.


The vicfg- commands are a set of commands used for managing ESX and ESXi hosts. They provide low-level access to host configuration settings and can be useful for troubleshooting issues related to host configuration. Some essential vicfg- commands for troubleshooting include:

  • vicfg-nics – Lists network interfaces and their configuration settings.
  • vicfg-route – Manages routing table entries on the host.
  • vicfg-vmknic – Manages VMkernel network interfaces.

Can be run against ESXi systems or against a vCenter Server system.

Some examples:

esxcli system version get

Will returns the ESXi build and version numbers.

esxcli system stats installtime get

Will give you a date and time of when ESXi was installed. (when upgrading an older systems, this might be interesting to know).

esxcli system account list

Will give you a list of the local users that are currently on your ESXi host.

esxcli system maintenanceMode set –enable true

Very useful command that is used to put your ESXi in maintenance mode (or take it out from maintenance mode).

esxcli system shutdown reboot -d 10 -r “Installation of Updates”

This command is used to reboot or shutdown ESXi host where  -d parameter is a countdown time. The minimum is 10 seconds. ESXi has to be in maintenance mode before you can use the command so use it in conjunction with the command just before this one.

esxcli storage filesystem list

Check your storage attached to your ESXi host. This command lists of all the volumes or datastores accessible by your ESXi host. The output shows the file system type, disk info along with the volume name, path and UUID.

similarly this one which provides more details about VMware nmp: (By default, ESXi provides an extensible multipathing module called Native Multipathing Plug-In (NMP). Generally, the VMware NMP supports all storage arrays listed on the VMware storage HCL and provides a default path selection algorithm based on the array type. The NMP associates a set of physical paths with a specific storage device, or LUN. For additional multipathing operations, the NMP uses submodules, called SATPs and PSPs. The NMP delegates to the SATP the specific details of handling path failover for the device. The PSP handles path selection for the device.)

esxcli storage nmp device list

Final Words

When it comes to troubleshooting VMware vSphere infrastructure, having a good understanding of the VMware CLI commands can greatly enhance your troubleshooting capabilities. The esxcli, vim-cmd, and vicfg- commands provide access to various aspects of the virtual infrastructure, allowing you to diagnose and resolve issues efficiently. By familiarizing yourself with these essential VMware CLI commands, you can become a more effective troubleshooter and gain better control over your VMware vSphere environment.

More posts from ESX Virtualization:

  • VMware vCenter Server 8.0 U1b resolves further upgrade issues and adds bunch of security patches
  • VMware vCenter Server Appliance 8.0U1a Released
  • VMware vSphere 8.0 U1 Announced
  • VMware vSAN 8.0 U1 What's New?
  • vSphere 8.0 Page
  • Veeam Bare Metal Recovery Without using USB Stick (TIP)
  • ESXi 7.x to 8.x upgrade scenarios
  • A really FREE VPN that doesn’t suck
  • Patch your ESXi 7.x again
  • VMware vCenter Server 7.03 U3g – Download and patch
  • Upgrade VMware ESXi to 7.0 U3 via command line
  • VMware vCenter Server 7.0 U3e released – another maintenance release fixing vSphere with Tanzu
  • What is The Difference between VMware vSphere, ESXi and vCenter
  • How to Configure VMware High Availability (HA) Cluster
  • Homelab v 8.0 
    • NXJ6412 Maxtang EHL30 TPM Alert in vCenter Server 8.0 BIOS Config
    • vSphere 8 Lab with Cohesity and VMware vExpert gift – Maxtang’s NX 6412 NUC
    • VMware Cohesity vExpert Gift VMware EXPLORE 2022 Barcelona
Shares
Vote !

| Filed Under: Server Virtualization

About Vladan SEGET

This website is maintained by Vladan SEGET. Vladan is as an Independent consultant, professional blogger, vExpert x16, Veeam Vanguard x9, VCAP-DCA/DCD, ESX Virtualization site has started as a simple bookmarking site, but quickly found a large following of readers and subscribers.

Connect on: Facebook. Feel free to network via Twitter @vladan.

Private Sponsors

Featured

  • Thinking about HCI? G2, an independent tech solutions peer review platform, has published its Winter 2023 Reports on Hyperconverged Infrastructure (HCI) Solutions.
  • Zerto: One Platform for Disaster Recovery, Backup & Cloud Mobility: Try FREE Hands-On Labs Today!
Click to Become a Sponsor

Most Recent

  • Veeam Backup & Replication v13 Beta: A Game-Changer with Linux
  • What is Veeam Data Cloud Vault and how it can help SMBs
  • Nakivo Backup and Replication – Malware Scan Feature
  • Zerto 10 U7 released with VMware NSX 4.2 Support
  • XorMon NG 1.9.0 Infrastructure Monitoring – now also with Veeam Backup Support
  • Heartbeat vs Node Majority StarWind VSAN Failover Strategy
  • Vulnerability in your VMs – VMware Tools Update
  • FREE version of StarWind VSAN vs Trial of Full version
  • Commvault’s Innovations at RSA Conference 2025 San Francisco
  • VMware ESXi FREE is FREE again!

Get new posts by email:

 

 

 

 

Support us on Ko-Fi

 

 

Buy Me a Coffee at ko-fi.com

Sponsors

Free Trials

  • DC Scope for VMware vSphere – optimization, capacity planning, and cost management. Download FREE Trial Here.
  • Augmented Inline Deduplication, Altaro VM Backup v9 For #VMware and #Hyper-V – Grab your copy now download TRIAL.

VMware Engineer Jobs

VMware Engineer Jobs

YouTube

…

Find us on Facebook

ESX Virtualization

…

Copyright © 2025 ·Dynamik-Gen · Genesis Framework · Log in