VMware ESXi Datastores refresh issue incorrect free space
We do manual datastore scan or HBA scan to show the correct free space .
We can change the refresh interval manually to edit config.xml file in esxi host.
To change the refresh interval, edit the configuration file and change the refreshInterval
value to the desired interval.
To change the refreshInterval
value:
- Using a text editor, open the
/etc/vmware/hostd/config.xml
file on the host. - Locate the
<datastore>
element. This element in the default file is similar to:<datastore>
<!-- default datastore inventory-->
<!-- <inventory>/etc/vmware/hostd/datastores.xml</inventory> -->
<!-- default datastore refresh interval in minutes -->
<!-- use 0 to disable the auto refresh -->
<!-- <refreshInterval>0</refreshInterval> -->
<!-- default datastore list refetch interval, after getting a VMFS event, in seconds-->
<!-- <refetchVMFSDatastoreListInterval>30</refetchVMFSDatastoreListInterval> -->
</datastore> - Remove the comment indicators and replace the 0 (zero) in the
<refreshInterval>
element with the desired number of minutes. For example, to set the refresh interval to one hour, change this line:<!-- <refreshInterval>0</refreshInterval> -->
to:
<refreshInterval>60</refreshInterval>
- Save and close the file.
- Restart the hostd service for the changes to take effect.
- /etc/init.d/hostd restart