Last week there was a question on VMTN around maintenance mode, this customer wanted to find out which vSAN Maintenance Mode option was used while the host was placed in maintenance mode. The person who placed the host into maintenance wasn’t around, and I guess the customer wanted to know if data was moved from the host or not. They looked at the events and tasks, but unfortunately it wasn’t obvious from that vCenter section, next up were the logs. I also looked at the logs, and you would expect this info to be stored in hostd.log, but it wasn’t, so where is it? Well it actually is a configuration item, and you can dig it up here:
Pre ESXi 7.0 the info is stored in the “esx.conf” file, just grep for “hostDecommission”. Let me show you:
$ grep "/vsan/hostDecommission" /etc/vmware/esx.conf /vsan/hostDecommissionVersion = "10" /vsan/hostDecommissionState = "decom-state-decommissioned" /vsan/hostDecommissionMode = "decom-mode-ensure-object-accessibility"
If the ESX is at 7.0 or later, just run the below config store command:
$ configstorecli config current get -c vsan -g system -k host_state { "decom_mode": "ENSUREOBJECT_ACCESSIBILITY", "decom_state": "DECOMMISSIONED", "decom_version": 0 }
I hope that helps others who have a similar question!
SK says
Hi Duncan,
I tried running the above command (7U2 in vSAN) using configstorecli, but it ends up with an error message “Error Code: 1204
Message: Schema object not found for component/group/key”. Where am I going wrong? And can you point to any documentation related to configstorecli apart from the KB Article 82637 and 82227, which give me an explanation as to what is considered as a component / group / key.
Many Thanks !!!
SK says
Hi Duncan, it worked. sorry to bother you, but if you can still point me to some documentation, it would be really helpful
Duncan Epping says
there’s no documentation other then the KB. most of this stuff I had to figure out myself just by trying unfortunately. I have already contacted the engineering team about it.
SK says
Thank you so much for taking the time out to reply. If you hear anything back from engineering regarding documentation, pls let us know.