Mastering ESXi CLI: Essential to Advanced Commands in VMware ESXi 7.0 & 8.0
byvLOOKUPHUB-
0
VMware ESXi is a bare-metal type 2 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.
ESXi CLI Commands Cheat Sheet
Basic ESXi Host Commands
Command
Description
Example / Notes
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 (see above)
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:contentReference[oaicite:6]{index=6}
Networking Commands
Command
Description
Example / Notes
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 which are active
esxcli network firewall set --enabled false
Disable the host firewall
Useful for troubleshooting (re-enable after)
esxcli network firewall set --enabled true
Enable the host firewall
Recommended for security
Storage Commands
Command
Description
Example / Notes
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 (CID=0) or thick
VM Management Commands
Command
Description
Example / Notes
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 from above
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 files, just removes from host
esxcli vm process list
List running VMs and World IDs
Shows state of VM processes (use with next command)
esxcli vm process kill --type=soft --world-id=<id>