Attempting to unmount an datastore fails even though it's not being used by any VM
VMware vSphere ESXi 8.x
VMware vSphere ESXi 7.x
VMware vSphere ESXi 6.x
Unmounting or removing a datastore will fail if any virtual machine templates are 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.
3.Retry the unmount operation after confirming that no registered objects are present on the datastore.
or "Deploy the template as a VM and migrate it to another Datastore and make that VM a template again "
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