Unable to mount NFS datastore.
Mount operation fails from both, UI and ssh.
VMware vSphere ESXi 8.0.x
VMware vSphere ESXi 7.0.1 and later
The mount operation can fail if there is a stale entry of the NFS Datastore configuration in the Configuration Store of ESXi
Remove the related stale entry in the ESXi Configuration Storage.
To remove one specific NFS 3 datastoreconfigstorecli config current delete -c esx -g storage -k nfs_v3_datastores --i nfs_datastorename
To remove all NFS 3 datastoresconfigstorecli config current delete -c esx -g storage -k nfs_v3_datastores --all
To remove one specific NFS 4.1 datastoreconfigstorecli config current delete -c esx -g storage -k nfs_v41_datastores --i nfs4.1_datastorename
To remove all NFS 4.1 datastoresconfigstorecli config current delete -c esx -g storage -k nfs_v41_datastores --all
We may now mount the NFS Datastore
ESXi 7.0U1 onward, the NFS configuration is saved in a Configuration Store unlike old versions where it was saved in /etc/vmware/esx.conf file. We may review it by running the following commands:
NFS 3configstorecli config current get -c esx -g storage -k nfs_v3_datastores
NFS 4.1configstorecli config current get -c esx -g storage -k nfs_v41_datastores