Deleting a vmkdump .dumpfile on ESXi 7

A "Delete Datastore" operation failing due to an in-use dump file
A "Delete Datastore" operation failing due to an in-use dump file

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.


PREREQUISITES

  1. An ESXi host with SSH enabled

STEPS

  1. SSH into the ESXi host
  2. Run esxcli system coredump file set -u to unconfigure the dump file
  3. Run 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!