Unable to delete datastores presented to multiple clusters across multiple different vCenter datacenters, with "The resource '########-########-####-############' is in use."
search cancel

Unable to delete datastores presented to multiple clusters across multiple different vCenter datacenters, with "The resource '########-########-####-############' is in use."

book

Article ID: 404962

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

Datastores are presented to clusters in multiple environments and hosts are being decommissioned in only one of the environments, but are in use in the other environment, deletion fails with an error "The resource '########-########-####-############' is in use." 

You will also see the following error in vCenter vpxd.log

"Cannot remove datastore 'Datastore Name: DATASTOR_NAME VMFS uuid: ########-########-####-############' because file system is busy. Correct the problem and retry the operation."

Environment

8.0U3

Cause

Datastores are in use in the other environment, either by virtual machines or various vSphere services, the task to delete a datastore implicitly needs to also delete datastore partitions on the local or LUN device which cannot occur if the datastore is in use

For more information on identifying services or virtual machines using a datastore, and instructions to detach a LUN device, see the following KB:

Detach a LUN device from ESXi hosts

Resolution

In this specific scenario, you only need to unmount the datastores in the environment being decommissioned, rather than delete them

Otherwise, if hosts are already placed into maintenance mode, then hosts can simply be shutdown effectively unmounting all datastores presented to the host