Part 7 – Using esxcli commands

In this post, we will take a look at the escli commands that can be used to find information of the VSAN cluster. Sometimes it is very helpful to use esxcli commands rather than navigating around different options in web client. Let’s look at some of the frequently helpful esxcli commands for VSAN. esxcli commands are executed on the ESXi ssh console. Make sure SSH is enabled on ESXi host to execute the below commands. Refer my previous post on enabling SSH on ESXi host here.

esxcli vsan cluster

  • get     -        Get information about the Virtual SAN cluster that this host is joined to.
  • join    -       Join the host to a Virtual SAN cluster.
  • leave  -    Leave the Virtual SAN cluster the host is currently joined to.
  • new    -      Create a Virtual SAN cluster with current host joined. A random sub-cluster UUID will be generated.
  • restore - Restore the persisted Virtual SAN cluster configuration.

2016-08-16 09_35_46-esxi-1.vmmaster.local - PuTTY

esxcli vsan network

  • clear   -  Clear the VSAN network configuration.
  • list    -  List the network configuration currently in use by VSAN.
  • remove  -  Remove an interface from the VSAN network configuration.
  • restore - Restore the persisted VSAN network configuration.


2016-08-16 09_36_55-esxi-1.vmmaster.local - PuTTY

esxcli vsan storage

  • add    -  Add physical disk for VSAN usage.
  • list   -  List VSAN storage configuration.


  • remove – Remove physical disks from VSAN disk groups.

2016-08-16 09_38_43-esxi-1.vmmaster.local - PuTTY

esxcli vsan storage list can be used to check if the Disk is an SSD disk, if the disks are claimed by CMMDS ( Cluster Monitoring, Membership, and Directory Service). We can also see the On-disk format version whether Deduplication and Compression are enabled. Finally, whether the disk is participating in the Cache or Capacity tier in the VSAN diskgroup.

esxcli vsan policy

  • cleardefault   -  Clear default VSAN storage policy values.
  • getdefault     -  Get default VSAN storage policy values.
  • setdefault     -  Set default VSAN storage policy values.

2016-08-16 12_26_35-esxi-1.vmmaster.local - PuTTY

esxcli vsan trace

  • get      -  Get the VSAN tracing configuration.
  • set      -  Configure VSAN trace. Please note: This command is not thread safe.

2016-08-16 09_54_40-esxi-1.vmmaster.local - PuTTY

On an ESXi host that is configured to boot from USB and running VSAN, the VSAN traces are written to RAM first and then moved to a persistent disk during the host shutdown or crash. There is no advanced option available to configure traces of VSAN on ESXi, it can only be done with esxcli as of now.

For more option on the esxcli for vsan, refer the vSphere 5.5 document; most of the commands are still valid on version 6.

Hope this was informative. Thanks!

Part 1 – Introduction to VSAN

Part 2 – VSAN Lab Setup

Part 3 – Upgrade On-Disk Format Version

Part 4 – Disk Groups and vsanDatastore

Part 5 – Storage Providers and Policies

Part 6 – Space Efficiency Techniques

Part 7 – Using esxcli commands


#cluster, #esxcli, #network, #storage, #trace, #vsan