
VMware ESXi is a bare-metal type 1 hypervisor that runs directly on server hardware to host virtual machines. Managing ESXi hosts often requires using the ESXi Shell or SSH to execute commands for configuration, troubleshooting, and monitoring porpoises. SSH and the CLI are the fastest and sometimes the only way to get things done, especially during troubleshooting, automation, or upgrades.
This article covers essential ESXi 7.0 and 8.0 commands, moving from basic administrative tasks to advanced troubleshooting and configuration.
Let’s dive in the some useful ESXi host commands.

Basic ESXi Host Commands
Command | Description | Example / Notes | Copy |
---|---|---|---|
esxcli system version get | Show ESXi version, build, and patch information | Useful to verify exact build details | |
esxcli system hostname get | Show the current host name (and domain) | Can verify FQDN settings | |
esxcli system uptime get | Show how long the host has been running | Helps determine if host was recently rebooted | |
esxcli system stats installtime get | Show the ESXi installation date/time | Confirms when host was first installed | |
esxcli system maintenanceMode set --enable yes | Enter maintenance mode | Required before patching or shutdown | |
esxcli system maintenanceMode set --enable no | Exit maintenance mode | Use after maintenance tasks complete | |
esxcli system shutdown poweroff -d 60 -r "Updating ESXi" | Shutdown host after delay | e.g., schedule shutdown with reason | |
esxcli system shutdown reboot -d 60 -r "Rebooting host" | Reboot host after delay | Delay and reason optional | |
dcui | Open the Direct Console User Interface | Useful for local console access to host console menu | |
esxtop | Launch ESX TOP (real-time performance monitor) | Shows CPU, memory, network, and disk stats |
Networking Commands
Command | Description | Example / Notes | Copy |
---|---|---|---|
esxcli network ip connection list | List active TCP/UDP connections | Shows network connections and status | |
esxcli network nic list | List physical NICs on the host | Shows link status, speed, driver, and MAC | |
esxcli network ip interface list | List VMkernel network interfaces | Shows VMkernel vNICs and their IP info | |
esxcli network ip interface ipv4 get | Get IPv4 settings for VMkernel interfaces | Useful to confirm IP and subnet | |
esxcli network vm list | List VMkernel network details per VM | Shows which vNIC is connected to which vSwitch/portgroup | |
esxcli network vswitch standard list | List standard vSwitches and portgroups | Shows vSwitch names, MTU, and portgroup names | |
esxcli network nic stats get -n vmnic0 | Show statistics for vmnic0 | Replace vmnic0 as needed for other NICs | |
esxcli network firewall get | Get firewall status | Shows if firewall is enabled/disabled | |
esxcli network firewall ruleset list | List all firewall rulesets | Use --enabled flag to see active rulesets | |
esxcli network firewall set --enabled false | Disable the host firewall | Useful for troubleshooting (remember to re-enable) | |
esxcli network firewall set --enabled true | Enable the host firewall | Recommended for production security |
Storage Commands
Command | Description | Example / Notes | Copy |
---|---|---|---|
esxcli storage filesystem list | List mounted file systems and VMFS datastores | Shows datastore names, UUIDs, and mount points | |
esxcli storage vmfs extent list | List VMFS extent information | Useful for detailed VMFS volume layout | |
esxcli storage core path list | List all storage paths | Shows paths to storage devices (used for multipathing) | |
esxcli storage nfs list | List mounted NFS volumes | Shows NFS server, share, and mount status | |
esxcli iscsi adapter list | List iSCSI adapters (software and hardware) | Shows iSCSI HBA names | |
esxcli storage core adapter rescan --all | Rescan all storage adapters | Use to detect new storage devices or LUNs | |
esxcli storage core device list | List all storage devices (NAA IDs) | Find the device ID for SMART checks or RDMs | |
esxcli storage core device smart get -d naa.XXX | Get S.M.A.R.T. info for a disk | Replace naa.XXX with device from above | |
vmkfstools -D /vmfs/volumes/datastore/vm.vmdk | Check disk type (thin/thick) | Output shows if disk is thin or thick. |
VM Management Commands
Command | Description | Example / Notes | Copy |
---|---|---|---|
vim-cmd vmsvc/getallvms | List all registered VMs on the host | Shows VMID, name, file path, guest OS | |
vim-cmd vmsvc/power.on <vmid> | Power on the VM with ID vmid | Replace <vmid> with the actual VM ID | |
vim-cmd vmsvc/power.off <vmid> | Power off the VM with ID vmid | Equivalent to ACPI shutdown/power off | |
vim-cmd vmsvc/unregister <vmid> | Unregister (remove) VM from inventory | Does not delete VM files | |
esxcli vm process list | List running VMs and World IDs | Use World ID to kill stuck VM processes | |
esxcli vm process kill --type=soft --world-id=<id> | Forcefully kill a VM process | Use –type=hard or force if soft fails | |
vim-cmd vmsvc/snapshot.create <vmid> <snapshot_name> | Create a snapshot for VM | Provide the VM ID and snapshot name | |
vim-cmd vmsvc/snapshot.removeall <vmid> | Remove all snapshots for VM | Free space and consolidate snapshots |
vSphere vSAN Cluster Commands
Command | Description | Example / Notes | Copy |
---|---|---|---|
esxcli vsan cluster get | Show vSAN cluster membership | Displays cluster UUID and node list | |
esxcli vsan cluster join -u <cluster-uuid> | Join this host to a vSAN cluster | Replace <cluster-uuid> with the target cluster’s UUID | |
esxcli vsan cluster leave | Remove this host from its vSAN cluster | Used for maintenance or decommissioning | |
esxcli vsan cluster new | Create a new vSAN cluster with this host | Generates a new cluster UUID | |
esxcli vsan cluster preferredfaultdomain get | Show preferred fault domain (stretched cluster) | Displays currently configured preferred site | |
esxcli vsan cluster preferredfaultdomain set --preferred-fault-domain-name <name> | Set the preferred fault domain | Used in stretched vSAN site configurations |
Cluster & HA Commands
Command | Description | Example / Notes | Copy |
---|---|---|---|
vim-cmd hostsvc/cluster/get | Get cluster info | Returns details if the ESXi host is part of a cluster | |
esxcli system settings advanced list -o /Cluster/Ha | List HA advanced settings | Displays High Availability configuration options | |
vim-cmd hostsvc/ha/agentstatus | Check HA agent status | Shows whether the HA agent is running and healthy | |
vim-cmd hostsvc/ha/cluster/masters | View HA master hosts | Identify which hosts are HA masters in the cluster |
Performance & Troubleshooting Commands
Command | Description | Example / Notes | Copy |
---|---|---|---|
esxtop | Real-time performance monitor | Press h inside esxtop for help (CPU, memory, network, etc.) | |
vsish | Interactive VMkernel shell (low-level debug) | Use with caution; advanced troubleshooting only | |
esxcli system process list | List processes on the host | Shows running processes and their usage | |
esxcli hardware cpu list | Show CPU configuration and features | Useful to verify CPU model, cores, and virtualization support | |
esxcli hardware memory get | Show memory size and module details | Displays total memory and DIMM slot info | |
esxcli hardware environment get | Retrieve hardware sensor (temperature, fan) status | Displays temperature, fan speed, and power state | |
vmkload_mod --list | List loaded VMkernel modules (drivers) | Verify if a specific driver or module is loaded | |
esxcli system syslog config get | Show syslog configuration | Displays log output path and rotation settings |
Advanced Configuration & Debugging Commands
Command | Description | Example / Notes | Copy |
---|---|---|---|
esxcli system settings advanced list | List current advanced settings | Use -d to include default values; many hidden tunables | |
esxcli system settings advanced set -o /Net/FollowHardwareMac -i 1 | Set advanced option value | Changes setting to follow MAC on failover (example) | |
esxcli system syslog config get | Show current syslog settings | Verify log file location, rotation, remote syslog etc. | |
esxcli system syslog reload | Reload syslog configuration | Required after making changes to syslog config | |
esxcli software vib list | List all installed VIBs | View installed drivers, agents, and patch components | |
esxcli hardware pci list | List all PCI hardware devices | Helpful for HBA, GPU, NIC detection and vendor IDs |
esxcli system settings kernel list | List kernel advanced settings | Helpful for kernel tuning or debugging | |
esxcli system settings advanced set -o <option> -i <value> | Set advanced kernel option | Use with caution for low-level tuning | |
esxcli system maintenanceMode set --enable true | Enable maintenance mode | Required before host patching or reboot | |
vim-cmd vimsvc/auth/lockdown_mode_get | Check Lockdown Mode status | Returns current lockdown setting (0, 1, or 2) | |
vim-cmd vimsvc/auth/lockdown_mode_set 0 vim-cmd vimsvc/auth/lockdown_mode_set 1 vim-cmd vimsvc/auth/lockdown_mode_set 2 | Set Lockdown Mode | 0 = Disabled, 1 = Normal, 2 = Strict | |
esxcli software vib list | List installed VIB packages | Shows installed drivers and patch components | |
esxcli software profile get | Show current software profile | Displays ESXi build/version and profile name | |
esxcli hardware memory get | Display memory info | Shows total installed memory and layout | |
esxcli system coredump network check | Check network coredump config | Verifies if host is set up for remote coredumps | |
esxcli system coredump network set --interface-name=vmkX --host=<ip> | Set network coredump destination | Replace vmkX and <ip> with actual values |
Note:
- Use vSphere Client, Putty or DCUI to enable SSH for running these commands remotely.
- Use esxcli <namespace> –help to explore subcommands.
- Some commands can disrupt host operations. So always put esxi in Maintenance Mode and test in staging environments before production.
- Use /var/log files extensively for troubleshooting.
Explore related articles on vlookuphub