Removing coredump file fails with error "Unlink of file /vmfs/volumes/<Datastore>/vmkdump/####.dumpfile failed: Device or resource busy."
search cancel

Removing coredump file fails with error "Unlink of file /vmfs/volumes/<Datastore>/vmkdump/####.dumpfile failed: Device or resource busy."

book

Article ID: 308537

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

Symptoms:

  • Trying to remove or unset the coredump file fails with error:

    Unlink of file /vmfs/volumes/<DatastoreName>/vmkdump/####.dumpfile failed: Device or resource busy.

  • When you run one of these commands, it fails to unlink or remove the core dump:

    esxcli system coredump file -u
    esxcli system coredump file remove -f /vmfs/volumes/<DatastoreName>/vmkdump/####.dumpfile

Environment

VMware vSphere ESXi 7.x
VMware vSphere ESXi 8.x

Cause

This issue occurs when another ESXi Host in the environment has an exclusive (Mode 2) lock on the dumpfile.

Resolution

To resolve this issue identify the host which is holding the lock on the dumpfile and remove it from that host.

  1. To verify the lock owner, run the below command against the dumpfile:

    vmfsfilelockinfo -p /vmfs/volumes/<DatastoreName>/vmkdump/####.dumpfile
  2. Open a SSH session to the ESXi host that holds the lock.

  3. List out the coredump files present:

    esxcli system coredump file list
  4. Un-configure the dumpfile by running this command:

    esxcli system coredump file -u

  5. Disable and delete the currently configured coredump file:

    esxcli system coredump file set --enable false
    esxcli system coredump file remove -f /vmfs/volumes/<DatastoreName>/vmkdump/####.dumpfile

    Note: On older ESXi version, the command 'vmfsfilelockinfo' is not available. In this case use vmkfstools to get the UUID of the ESXi Host which holds the lock.

    Example: vmkfstools -D /vmfs/volumes/<DatastoreName>/vmkdump/####.dumpfile