Unable to remove a datastore with no LUN backing from the vCenter Server inventory. The datastore has been successfully unmounted from all ESXi hosts but remains listed in the UI.
Attempting to delete the datastore fails with the following error message:
Datastore 'Fxx_xx_0x' is not accessible. "No connected and accessible host is attached to this datastore."
VMware vSphere ESXi 7.x
VMware vSphere ESXi 8.x
The datastore unmount and removal operation is blocked because one or more virtual machine templates are still registered and associated with the target datastore. A datastore cannot be safely unmounted or removed from a host while registered inventory objects (such as VMs or templates) reside on it, as this maintains an active resource lock.
Removing the templates from the vCenter Server inventory clears the dependency and releases the lock, permitting the removal operation to complete successfully.
Navigate to the affected Datastore in the vSphere Client.
Click Yes to confirm removing the template from the vCenter Server inventory.
Once all templates are unregistered, retry the datastore deletion operation.
Unmount datastore failed! The resource <Datastore> is in use.
For guidance on resolving host disconnection issues, refer to the following articles:
ESXi host disconnects intermittently from vCenter Server
ESXi host disconnects from vCenter Server after adding or connecting it to the inventory