Sometimes when deleting a datastore in vSphere/ESXi, you might run into an error similar to
file system is busy or
Device or resource busy. This is usually casued by a dump file being configured to use the datastore you are trying to delete, and is an easy fix.
- An ESXi host with SSH enabled
- SSH into the ESXi host
esxcli system coredump file set -uto unconfigure the dump file
esxcli system coredump file remove -f <full path to file here>
That's it! Now that the file is gone, you should be able to clear and/or delete the datastore. However, don't forget to re-enable and configure dumps again or else you won't have any dumps if something goes wrong!