During dataSets vAPI CRUD operations user got error message like:
“vapi-error: com.vmware.vapi.std.errors.error”.
Further check the vmware.log, which is within the same directory of the VM on the ESXi host, will found error logs:
“2022-01-25T02:20:53.246Z In(05) vmx - [msg.dataSetsMgr.storeCorrupt] Fail to open dataSet store, the file may be corrupt.” (If the dataSets store is corrupt)
“2022-01-25T02:23:30.915Z In(05) vmx - [msg.dataSetsMgr.storeMissing] The dataSet store file is missing.” (If the dataSets store is missing)
This issue might be a consequences of (not limited to) Power outage, Unplanned ESXi host shutdown, Storage failure, etc.
This issue is expected to occur very rarely in case of power outage/unplanned host shutdown.
The dataSets feature relies on the SQLite database files to store dataSets/entries. DataSets feature will not work if the store files are corrupt or unexpectedly missing. To fix this
1. The dataSets store files are SQLite database files named with *.dsd and/or *.dsv with in the same folder of the VM on the ESXi host, please follow the below steps:
2. If the above step is not successful or current dataSets can be dropped. Then the following steps could be applied to remove any existing datasets and references to any datasets files.
a. Power off the VM
b. Delete *.dsd, *.dsv, *.dsd-journal, and *.dsv-journal files in the same folder of the VM on the ESXi host
c. Manually edit the VM(s) vmx config file, remove the lines:
dataSetsMgr.diskStoreFile = "xxx.dsd"
dataSetsMgr.vmStoreFile = "xxx.dsv"
d. Power on the VM again.