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

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

book

Article ID: 379435

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

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

Environment

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

Cause

Unmounting or removing a datastore will fail if any virtual machine templates are 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.

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 "

 

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