Thursday, 8 November 2012

VMWare: Remove datastore problem - "The resource xxxxxxxxxxxxxxxxxxxxx" is in use

Today I've faced a situation, when I removed all VMs from a datastore, but I still couldn't remove it because of the following error:

Status: The resource 'xxxxxxxxxxxxxxxxxx' is in use.

What I did first, is unmounting the datastore on all hosts in the cluster. This allowed me to find two hosts which has locked this datastore. While all other hosts allowed me to unmount the datastore with no problem, those two returned me an error:

Status: The resource 'xxxxxxxx' is in use.
Erorr Stack: Cannot unmount volume 'xxxxxxxx' because file system is busy. Correct the problem and retry the operation.

At this moment I've remembered, that some time ago in order to install some upgrade, I needed to configure a ScrathConfig option to use some external location on those two hosts.

Go to "Inventory > Hosts and Clusters", select host that uses a datastore, goto "Configuration" tab, and click on "Advanced Settings" option. Find "ScratchConfig" section and change to something else (e.g. /tmp). Restart the host. Now you will be able to remove the datastore.

PS: Of course, this tip is a kind of useless if it was you who configured this option. But if you've got some legacy which you haven't configured before.

PPS: I didn't have this situation, but I'd advice to check also option.


  1. Jeees, thanks! I was struggling to unmount a datastore for almost 2 days.

  2. thanks for your articles broooo, you save my SRM PoC !! :D