Get-Datastore -Refresh
command on an hourly schedule to the host.C:\Program Files\VMware\Infrastructure\vSphere PowerCLI> Get-Datastore -Refresh
Name FreeSpaceMB CapacityMB
---- ----------- ----------
isos 138986 554355
datastore1 2438 236544
MSCS-share 3298 3584
LH-iSCSI-0 15660 102144
LH-iSCSI-1 16612 50944
refreshInterval
value to the desired interval.refreshInterval
value:
/etc/vmware/hostd/config.xml
file on the host.<datastore>
element. This element in the default file is similar to:<datastore>
<!-- <inventory>/etc/vmware/hostd/datastores.xml</inventory> -->
<!-- <refreshInterval>0</refreshInterval> -->
<!-- <refetchVMFSDatastoreListInterval>30</refetchVMFSDatastoreListInterval> -->
</datastore>
<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>
Restart the hostd service for the changes to take effect.
"services": "/etc/vmware/service/",
"storage": {
"refetch_storage_interval": 120
$ /etc/init.d/hostd restart
Note:
/etc/vmware/hostd/config.xml is not applicable for ESXi hosts using ConfigStore.
ConfigStore was introduced in ESXi 7.0U1
For steps on How to change configuration settings for Hostd service in vSphere ESXi 7.0 Update 2 and later. See KB 319967
For more information, see: