Virtual machines residing on the datastore may experience delays or become unresponsive due to these locks.
/var/log/vmkernel.log indicate that files are locked by a consumer, leading to delays or unresponsiveness in virtual machines residing on the datastore.
VMware ESXi 7.x , 8.x
The root cause of this issue is related to the interaction between Storage I/O Control and NFS datastore access.
File is being locked by a consumer -
/var/log/vmkernel.log events are observed related to the file accessYYYY-MM-DDThh:mm:ss.250Z cpu74:12497368)WARNING: NFSLock: 4084: File is being locked by a consumer on host <host FQDN> with exclusive lock.YYYY-MM-DDThh:mm:ss.250Z cpu74:12497368)NFSLock: 5032: failed to get lock on file Virtual-Machine-flat.vmdk(.lck-f2c20#####000000) 0x430d2####890 on NFS-Datastore 464248####036916907-78128462####5098434 (127.0.0.1): Busy/var/log/vmkernel.logYYYY-MM-DDThh:mm:ss.091Z cpu73:9417945)SunRPC: 4727: Socket space full. rpc queued. 0x8192ca0fStorage I/O Control and Statistics Collection -
To address the underlying issue, engage the NFS vendor to validate the following parameters:
The vendor should provide recommended values for these parameters. VMware does not recommend making any changes to these parameters without guidance from the storage vendor.
For further information, refer to the Definition of the advanced NFS options and NFS connectivity issues on NetApp NFS filers on ESXi 6.x 7.x 8.x.
File is being locked by a consumer" are expected in an environment with Storage I/O Control or Storage I/O Control statistics collection enabled for NFS datastores and can be safely ignored.If Storage I/O Control is not required and the user wishes to prevent these messages, the following steps should be followed to disable both Storage I/O Control and Storage I/O Control statistics collection:
For more information on Storage I/O control, Manage Storage I/O Resources with vSphere