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...
By submitting your email address, you agree to receive emails regarding relevant topic offers from TechTarget and its partners. You can withdraw your consent at any time. Contact TechTarget at 275 Grove Street, Newton, MA.
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
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 basics
Related Q&A from Mike Preston
Snapshots can be used to undo botched upgrades, but can they be used to rebuild a broken VMDK file?continue reading
What is an OVA file and how does it compare to an Open Virtualization Format package?continue reading
VMware offers three CLI choices to run commands in a vSphere environment, but which one is the best option?continue reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.