ESXi host upgrade / Vib upgrade via CLI fails with the error message "Failed to query file system stats: Errors:"
search cancel

ESXi host upgrade / Vib upgrade via CLI fails with the error message "Failed to query file system stats: Errors:"

book

Article ID: 379241

calendar_today

Updated On:

Products

VMware vSphere ESXi 7.0 VMware vSphere ESXi 8.0

Issue/Introduction

  • During ESXi command line upgrade fails with:
[InstallationError]
 Failed to query file system stats: Errors:
 Error getting data for filesystem on '/vmfs/volumes/xxxxxxxx-xxxxxxxx-xxxx-xxxxxxxxxxxx': Cannot open volume: /vmfs/volumes/xxxxxxxx-xxxxxxxx-xxxx-xxxxxxxxxxxx, skipping.
      cause = Errors:
 Error getting data for filesystem on '/vmfs/volumes/xxxxxxxx-xxxxxxxx-xxxx-xxxxxxxxxxxx': Cannot open volume: /vmfs/volumes/xxxxxxxx-xxxxxxxx-xxxx-xxxxxxxxxxxx, skipping.
 Please refer to the log file for more details.

 

  • VIB upgrade/update via CLI fails with the following error message:
[InstallationError]
 Failed to query file system stats: Errors:
 Cannot open volume: 
      cause = Errors:
Cannot open volume:
 Please refer to the log file for more details.
    • The following snippets will be observed in the /var/run/log/esxupdate.log:

YYYY-MM-DDTHH:MM:SSZ esxupdate: XXXXXXXX: root: ERROR: Traceback (most recent call last):
YYYY-MM-DDTHH:MM:SSZ esxupdate: XXXXXXXX: root: ERROR:   File "/lib64/python3.8/site-packages/vmware/esximage/Utils/HostInfo.py", line 225, in _getFileSystemList
YYYY-MM-DDTHH:MM:SSZ esxupdate: XXXXXXXX: root: ERROR:     return runCli(cmd, True)
YYYY-MM-DDTHH:MM:SSZ esxupdate: XXXXXXXX: root: ERROR:   File "/lib64/python3.8/site-packages/esxutils.py", line 220, in runCli
YYYY-MM-DDTHH:MM:SSZ esxupdate: XXXXXXXX: root: ERROR: esxutils.EsxcliError: Errors:
YYYY-MM-DDTHH:MM:SSZ esxupdate: XXXXXXXX: root: ERROR: Cannot open volume:
YYYY-MM-DDTHH:MM:SSZ esxupdate: XXXXXXXX: root: ERROR:
YYYY-MM-DDTHH:MM:SSZ esxupdate: XXXXXXXX: root: ERROR:
YYYY-MM-DDTHH:MM:SSZ esxupdate: XXXXXXXX: root: ERROR: During handling of the above exception, another exception occurred:
YYYY-MM-DDTHH:MM:SSZ esxupdate: XXXXXXXX: root: ERROR:
YYYY-MM-DDTHH:MM:SSZ esxupdate: XXXXXXXX: root: ERROR: Traceback (most recent call last):
YYYY-MM-DDTHH:MM:SSZ esxupdate: XXXXXXXX: root: ERROR:   File "/usr/lib/vmware/esxcli-software", line 772, in <module>
YYYY-MM-DDTHH:MM:SSZ esxupdate: XXXXXXXX: root: ERROR:     main()

    • Running the command "df -h" on the affected ESXi host will result in the same error message: "Cannot open volume"

Environment

VMware vSphere ESXi 7.0.x
VMware vSphere ESXi 8.0.x

Cause

Issue with datastore not being presented properly.

Resolution

  • Make sure the presentation of the datastore from SAN is set for the ESXi host. Verify that the datastore shows up in the list of datastores and is accessible.

  • Perform a rescan of the storage of the affected ESXi host
    Reference: Performing a rescan of the storage on an ESXi host

  • Reattempt the upgrade. 

  • If it fails, reboot the host and verify that the datastore is present by searching for it in the datastore list for the host.  Retry the upgrade if the datastore is presented properly or doesn't exist.

  • After the upgrade, the datastore can be fixed either by being represented from the SAN storage and/or reconnected on the host.
    Please refer to the documentation: Mount Datastores