VMware ESXi CLI Cheatsheet
#
VMware ESXi CLI provides a set of commands to manage ESXi hosts directly from the command line. These commands help administrators perform system management, networking, storage, and troubleshooting tasks efficiently.
ESXi System Management
#
Command/Option | Example | Description |
---|
esxcli system version get | esxcli system version get | Display the ESXi host version |
esxcli system shutdown reboot | esxcli system shutdown reboot --reason "Maintenance" | Reboot the ESXi host |
esxcli system shutdown poweroff | esxcli system shutdown poweroff --reason "Maintenance" | Power off the ESXi host |
esxcli hardware cpu list | esxcli hardware cpu list | List CPU information |
esxcli hardware memory get | esxcli hardware memory get | Display memory information |
esxcli system time get | esxcli system time get | Display the current system time |
esxcli system settings advanced list | esxcli system settings advanced list | List advanced system settings |
esxcli system settings advanced set | esxcli system settings advanced set -o /UserVars/SuppressShellWarning -i 1 | Set an advanced system setting |
Virtual Machine Management
#
Command/Option | Example | Description |
---|
esxcli vm process list | esxcli vm process list | List running virtual machines |
esxcli vm process kill | esxcli vm process kill --type soft --world-id <world_id> | Kill a virtual machine process |
vim-cmd vmsvc/getallvms | vim-cmd vmsvc/getallvms | List all registered VMs on the host |
vim-cmd vmsvc/power.on | vim-cmd vmsvc/power.on <vmid> | Power on a virtual machine |
vim-cmd vmsvc/power.off | vim-cmd vmsvc/power.off <vmid> | Power off a virtual machine |
vim-cmd vmsvc/snapshot.create | vim-cmd vmsvc/snapshot.create <vmid> "snapshot_name" "description" | Create a snapshot for a virtual machine |
Network Management
#
Command/Option | Example | Description |
---|
esxcli network nic list | esxcli network nic list | List all network interfaces |
esxcli network nic up | esxcli network nic up -n <nic> | Bring up a network interface |
esxcli network nic down | esxcli network nic down -n <nic> | Bring down a network interface |
esxcli network vswitch standard list | esxcli network vswitch standard list | List all standard virtual switches |
esxcli network vswitch standard add | esxcli network vswitch standard add -v <vswitch_name> | Add a new standard virtual switch |
esxcli network vswitch standard uplink add | esxcli network vswitch standard uplink add -u <nic> -v <vswitch_name> | Add an uplink to a standard switch |
esxcli network ip interface list | esxcli network ip interface list | List all VMkernel network interfaces |
esxcli network ip interface add | esxcli network ip interface add -i vmk1 -p "Management Network" | Add a VMkernel network interface |
Storage Management
#
Command/Option | Example | Description |
---|
esxcli storage filesystem list | esxcli storage filesystem list | List all mounted file systems |
esxcli storage vmfs extent list | esxcli storage vmfs extent list | List all VMFS extents |
esxcli storage core adapter list | esxcli storage core adapter list | List all storage adapters |
esxcli storage core device list | esxcli storage core device list | List all storage devices |
esxcli storage core path list | esxcli storage core path list | List all storage paths |
esxcli storage core device vaai status get | esxcli storage core device vaai status get | Get VAAI status for storage devices |
Troubleshooting
#
Command/Option | Example | Description |
---|
esxcli hardware pci list | esxcli hardware pci list | List PCI devices |
esxcli system syslog mark | esxcli system syslog mark --message "Manual log entry" | Add a message to the system log |
esxcli network diag ping | esxcli network diag ping -I vmk0 -H <ip_address> | Ping an IP address from a specific VMkernel NIC |
esxcli network diag netdump | esxcli network diag netdump --server <ip_address> | Configure netdump for network troubleshooting |
esxtop | esxtop | Launch the ESXi performance monitoring tool |
This cheatsheet covers the most commonly used VMware ESXi CLI commands and options, helping you to manage ESXi hosts, virtual machines, networks, storage, and perform troubleshooting effectively.