Attempting to unmount an NFS datastore fails even though it's not being used by any VMs.
VMware vSphere ESXi 8.x
VMware vSphere ESXi 7.x
VMware vSphere ESXi 6.x
The operation to unmount or remove a datastore fails if the datastore has any virtual machine templates associated with it.
Remove the templates from the inventory
1. Right-click the template and select Remove from Inventory.
2. To confirm removing the template from the vCenter Server inventory, click Yes.
The template is unregistered from the vCenter Server inventory.
To list mounted NFS datastores,use the command :
# esxcli storage nfs list
To delete a datastore, use the command:
# esxcli storage nfs remove -v NFS_Datastore_Name
or
# esxcfg-nas -d NFS_Datastore_Name