VMware vSAN CLI Cheatsheet
#
VMware vSAN CLI provides commands to manage and configure vSAN environments. These commands help administrators perform tasks related to vSAN clusters, disk management, storage policies, and more directly from the command line.
General Commands
#
Command/Option | Example | Description |
---|
esxcli vsan cluster get | esxcli vsan cluster get | Display vSAN cluster information |
esxcli vsan cluster create | esxcli vsan cluster create | Create a new vSAN cluster |
esxcli vsan cluster remove | esxcli vsan cluster remove | Remove a host from a vSAN cluster |
Disk Management
#
Command/Option | Example | Description |
---|
esxcli vsan storage list | esxcli vsan storage list | List all vSAN storage devices |
esxcli vsan storage add | esxcli vsan storage add -d <device> | Add a device to the vSAN storage |
esxcli vsan storage remove | esxcli vsan storage remove -d <device> | Remove a device from the vSAN storage |
esxcli vsan storage tag | esxcli vsan storage tag add -d <device> -t capacityFlash | Tag a device for a specific vSAN purpose |
Network Management
#
Command/Option | Example | Description |
---|
esxcli vsan network list | esxcli vsan network list | List all vSAN network interfaces |
esxcli vsan network add | esxcli vsan network add -i <interface> | Add a network interface to the vSAN network |
esxcli vsan network remove | esxcli vsan network remove -i <interface> | Remove a network interface from the vSAN network |
esxcli vsan network ip add | esxcli vsan network ip add -i <interface> -a <ip_address> | Add an IP address to a vSAN network interface |
Health and Monitoring
#
Command/Option | Example | Description |
---|
esxcli vsan health cluster list | esxcli vsan health cluster list | List the health status of the vSAN cluster |
esxcli vsan health cluster get | esxcli vsan health cluster get | Get detailed health information for the vSAN cluster |
esxcli vsan health cluster silentcheck | esxcli vsan health cluster silentcheck | Perform a silent health check on the vSAN cluster |
esxcli vsan health network list | esxcli vsan health network list | List the health status of the vSAN network |
Storage Policies
#
Command/Option | Example | Description |
---|
esxcli vsan policy list | esxcli vsan policy list | List all vSAN storage policies |
esxcli vsan policy create | esxcli vsan policy create -n <policy_name> -c <policy_config> | Create a new vSAN storage policy |
esxcli vsan policy delete | esxcli vsan policy delete -n <policy_name> | Delete a vSAN storage policy |
esxcli vsan policy update | esxcli vsan policy update -n <policy_name> -c <policy_config> | Update a vSAN storage policy |
Troubleshooting
#
Command/Option | Example | Description |
---|
esxcli vsan debug object list | esxcli vsan debug object list | List all vSAN objects for debugging |
esxcli vsan debug object health | esxcli vsan debug object health | Check the health of vSAN objects |
esxcli vsan debug disk log | esxcli vsan debug disk log | Retrieve logs for vSAN disks |
esxcli vsan debug resync status | esxcli vsan debug resync status | Display the status of vSAN resynchronization |
Miscellaneous
#
Command/Option | Example | Description |
---|
esxcli vsan cluster quickstart | esxcli vsan cluster quickstart | Perform a quickstart for vSAN cluster setup |
esxcli vsan proactive rebalance | esxcli vsan proactive rebalance get | Get the status of proactive rebalance operations |
esxcli vsan proactive rebalance start | esxcli vsan proactive rebalance start | Start proactive rebalance operations |
esxcli vsan proactive rebalance stop | esxcli vsan proactive rebalance stop | Stop proactive rebalance operations |
This cheatsheet covers the most commonly used VMware vSAN CLI commands and options, helping you to manage vSAN clusters, disks, networks, health checks, storage policies, and perform troubleshooting effectively.