During a host failure, ESXi must be able to save diagnostic information to a preconfigured location for diagnostic and technical support purposes.

Typically, a partition to collect diagnostic information, also called a core dump, is created on a local storage device during ESXi installation. You can also configure an ESXi Dump Collector and keep core dumps on a network server for use during debugging. For information on setting up the ESXi Dump Collector, see Configure an ESXi Dump Collector in the VMware ESXi Installation and Setup documentation.

Another option is to use a file on a VMFS datastore to collect the diagnostic information.

Set Up a File as Core Dump Location

If the size of your available core dump partition is insufficient, you can configure ESXi to use a file on a VMFS datastore for diagnostic information.

Note: VMFS datastores on software iSCSI do not support core dump files.

Prerequisites

  • Make sure that the amount of available space in the datastore for a core dump file is twice as large as the recommended file size. For more information, see the Knowledge Base article 2058416.
  • Install ESXCLI. See Getting Started with ESXCLI. For troubleshooting, run esxcli commands in the ESXi Shell.

Procedure

  1. Create a VMFS datastore core dump file by running the following command:
    esxcli system coredump file add

    The command takes the following options, but they are not required and can be omitted:

    Option Description
    --datastore | -d datastore_UUID or datastore_name Specify the datastore for the dump file. If not provided, the system selects a datastore of sufficient size.
    --file | -f file_name Specify the filename of the dump file. If not provided, the system creates a unique name for the file.
    --size |-s file_size_MB Set the size in MB of the dump file. If not provided, the system creates a file of the size appropriate for the memory installed in the host.
  2. Verify that the file has been created:
    esxcli system coredump file list
    You can see the output similar to the following:
    Path                                             Active Configured Size
    ------------------------------------------------ ------ ---------- ---------
    /vmfs/volumes/52b021c3-.../vmkdump/test.dumpfile false  false      104857600
    
  3. Activate the core dump file for the host:
    esxcli system coredump file set

    The command takes the following options:

    Option Description
    --enable |-e Activate or deactivate the dump file. This option cannot be specified when unconfiguring the dump file.
    --path | -p The path of the core dump file to use. The file must be pre-allocated.
    --smart | -s This flag can be used only with --enable | -e=true. It causes the file to be selected using the smart selection algorithm.

    For example,

    esxcli system coredump file set --smart --enable true

    --unconfigure | -u Unconfigure the current VMFS dump file.
  4. Verify that the core dump file is active and configured:
    esxcli system coredump file list
    The output similar to the following indicates that the core dump file is active and configured:
    Path                                             Active Configured Size
    ------------------------------------------------ ------ ---------- ---------
    /vmfs/volumes/52b021c3-.../vmkdump/test.dumpfile True   True       104857600

What to do next

For information about other commands you can use to manage the core dump files, see the ESXCLI Reference documentation.

Deactivate and Delete a Core Dump File

Deactivate a configured core dump file and, if needed, remove it from the VMFS datastore.

You can temporarily deactivate the core dump file. If you do not plan to use the deactivated file, you can remove it from the VMFS datastore. To remove the file that has not been deactivated, you can use the esxcli system coredump file remove command with the --force | -F parameter.

Prerequisites

Install ESXCLI. See Getting Started with ESXCLI. For troubleshooting, run esxcli commands in the ESXi Shell.

Procedure

  1. List the core dump files:
    esxcli system coredump file list
  2. Deactivate the core dump file by running the following command:
    esxcli system coredump file set --unconfigure | -u
  3. Remove the file from the VMFS datastore:
    esxcli system coredump file remove --file | -f file_name

    The command takes the following options:

    Option Description
    --file | -f Enter the name of the dump file to be removed. If you do not enter the name, the command removes the default configured core dump file.
    --force | -F Deactivate and unconfigure the dump file being removed. This option is required if the file has not been previously deactivated and is active.

Results

The core dump file is removed from the VMFS datastore.