Unable to apply vSAN OSA cluster license with error: "The license capacity is insufficient".
VMware vSAN 8.x
In addition to the vSAN CMMDS database, vSAN disk inventory is tracked in the ESXi configstore which is also used to calculate vSAN capacity. Occasionally during certain disk replacement activities, these disk entries might not be properly removed from the configstore resulting in an overcalculation of the total cluster vSAN capacity
To validate the vSAN OSA configstore disk inventory directly on each cluster host:
# /bin/configstorecli config current get -c vsan -g system -k host_config
Compare the number of capacity disks to the following output on each cluster host, capacity disks in configstore output that do not show up here should account for the extra capacity reported:
# vdq -Hi
Remove the extra capacity disk from configstore, first validate the vSAN configstore disk inventory:
# configstorecli config current get -c vsan -g system -k host_config |grep name
Export the host_config configstore:
# configstorecli config current get -c vsan -g system -k host_config -outfile /tmp/host_config.json
Copy the existing host_config configstore and edit with vi:
# cp /tmp/host_config.json /tmp/host_config_new.json
# vi /tmp/host_config_new.json
Remove the lines specific to the vSAN capacity disk in question, example:
{
"disk_uuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"name": "naa.58##############",
"tags": [
"capacityFlash"
],
"vsan_capacity": 3840755982336
},
Save the new file & import the new host_config configstore:
# configstorecli config current set -c vsan -g system -k host_config -infile /tmp/host_config_new.json
Restart hostd and vsanmgmtd services:
# /etc/init.d/hostd restart
# /etc/init.d/vsanmgmtd restart
You may also see capacity disks listed without a disk_uuid or vsan_capacity lines, these do not count towards total cluster capacity but should also be removed
{
"name": "naa.58##############",
"tags": [
"capacityFlash"
],
},