echo "hostname,decomState,decomJobType";for host in $(cmmds-tool find -t HOSTNAME -f json |grep -B2 Healthy|grep uuid|awk -F \" '{print $4}');do hostName=$(cmmds-tool find -t HOSTNAME -f json -u $host|grep content|awk -F \" '{print $6}');decomInfo=$(cmmds-tool find -t NODE_DECOM_STATE -f json -u $host |grep content|awk '{print $3 $5}'|sed 's/,$//');echo "$hostName,$decomInfo";done|sort
hostname,decomState,decomJobType
esxi1,0,0
esxi2,0,0
esxi3,0,0
esxi4,6,0 >> DECOM STATE 6
esxi5,0,0
esxi6,0,0
Decommission State | Meaning |
0 | None - the node is not decommissioned |
1 | The decommissioning process has been started |
3 | The decommissioning process is underway |
6 | The node has been decommissioned |
cmmds-tool find -t NODE_DECOM_STATE
cmmds-tool find -t HOSTNAME -u (UUID provided by the above command)
For example, check the below output:
VMware vSAN 7.x
VMware vSAN 8.X