Unmount NFS datastore failed! The resource <NFS Datastore> is in use.
search cancel

Unmount NFS datastore failed! The resource <NFS Datastore> is in use.

book

Article ID: 379435

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

Attempting to unmount an NFS datastore fails even though it's not being used by any VMs.

Environment

VMware vSphere ESXi 8.x
VMware vSphere ESXi 7.x
VMware vSphere ESXi 6.x

Cause

The operation to unmount or remove a datastore fails if the datastore has any virtual machine templates associated with it. 

Resolution

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.

Additional Information

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