VMware vSAN CLI

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/OptionExampleDescription
esxcli vsan cluster getesxcli vsan cluster getDisplay vSAN cluster information
esxcli vsan cluster createesxcli vsan cluster createCreate a new vSAN cluster
esxcli vsan cluster removeesxcli vsan cluster removeRemove a host from a vSAN cluster

Disk Management #

Command/OptionExampleDescription
esxcli vsan storage listesxcli vsan storage listList all vSAN storage devices
esxcli vsan storage addesxcli vsan storage add -d <device>Add a device to the vSAN storage
esxcli vsan storage removeesxcli vsan storage remove -d <device>Remove a device from the vSAN storage
esxcli vsan storage tagesxcli vsan storage tag add -d <device> -t capacityFlashTag a device for a specific vSAN purpose

Network Management #

Command/OptionExampleDescription
esxcli vsan network listesxcli vsan network listList all vSAN network interfaces
esxcli vsan network addesxcli vsan network add -i <interface>Add a network interface to the vSAN network
esxcli vsan network removeesxcli vsan network remove -i <interface>Remove a network interface from the vSAN network
esxcli vsan network ip addesxcli vsan network ip add -i <interface> -a <ip_address>Add an IP address to a vSAN network interface

Health and Monitoring #

Command/OptionExampleDescription
esxcli vsan health cluster listesxcli vsan health cluster listList the health status of the vSAN cluster
esxcli vsan health cluster getesxcli vsan health cluster getGet detailed health information for the vSAN cluster
esxcli vsan health cluster silentcheckesxcli vsan health cluster silentcheckPerform a silent health check on the vSAN cluster
esxcli vsan health network listesxcli vsan health network listList the health status of the vSAN network

Storage Policies #

Command/OptionExampleDescription
esxcli vsan policy listesxcli vsan policy listList all vSAN storage policies
esxcli vsan policy createesxcli vsan policy create -n <policy_name> -c <policy_config>Create a new vSAN storage policy
esxcli vsan policy deleteesxcli vsan policy delete -n <policy_name>Delete a vSAN storage policy
esxcli vsan policy updateesxcli vsan policy update -n <policy_name> -c <policy_config>Update a vSAN storage policy

Troubleshooting #

Command/OptionExampleDescription
esxcli vsan debug object listesxcli vsan debug object listList all vSAN objects for debugging
esxcli vsan debug object healthesxcli vsan debug object healthCheck the health of vSAN objects
esxcli vsan debug disk logesxcli vsan debug disk logRetrieve logs for vSAN disks
esxcli vsan debug resync statusesxcli vsan debug resync statusDisplay the status of vSAN resynchronization

Miscellaneous #

Command/OptionExampleDescription
esxcli vsan cluster quickstartesxcli vsan cluster quickstartPerform a quickstart for vSAN cluster setup
esxcli vsan proactive rebalanceesxcli vsan proactive rebalance getGet the status of proactive rebalance operations
esxcli vsan proactive rebalance startesxcli vsan proactive rebalance startStart proactive rebalance operations
esxcli vsan proactive rebalance stopesxcli vsan proactive rebalance stopStop 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.

VMware vSAN CLI

Explore our comprehensive cheatsheets to enhance your knowledge and efficiency. Each cheatsheet provides detailed command options, examples, and descriptions to help you master various tools and technologies.