How to clear a clogged core dump in VMware ESXi

With a little manipulation via SSH or ESXi Shell, a locked core dump file can soon be just a distant memory for your ESXi environment.

I found a large core dump file in the VMKDUMP folder in my ESXi system that I need to delete so I can add more...

VMs. When I try to remove the file, I get an error message. I can't remove it with either console or PowerCLI commands. How can I delete this file?

First off, by only having one host you have already eliminated half of the work required to remove a core dump -- finding out which host generated the file.

The core dump file is a container that ESXi will put information in when it experiences a kernel panic, causing a Purple Screen of Death. The reason you cannot remove this is that the host will maintain a lock on the file to ensure it has a target on which to write that diagnostic information. When you attempt to manually delete it, you receive an error -- just as you would if you tried to delete a running VM.

We do have a way to manipulate a core dump; unfortunately, it doesn't involve point and click or the GUI. To delete them, you will need to gain access to the CLI through either SSH or the ESXi Shell. Both options are disabled in every default installation of ESXi but can easily be changed by starting the required services -- SSH or ESXi Shell -- inside the "Security Profile" section of a host configuration tab.

After we enable shell access, we can use the core dump sections of the esxcli to add, modify and remove core dump files. To list the active core dump files for a host, we can use the following command:

esxcli system coredump file list

Core dump list
An esxcli command displays the core dump file list in the ESXi system.

As the screenshot indicates, I have one core dump file on the host that I executed the command. To remove it, we can use the following command:

esxcli system coredump file remove –F

The -F parameter specifies we want to force the removal of the dump file. You should now be able to browse back to your data store and see the file has been removed to free the space for additional VMs.

Dig Deeper on VMware ESXi, vSphere and vCenter

Virtual Desktop
Data Center
Cloud Computing