Monday, 23 November 2015

Active Coredump partition while Using Coredump to file

Written by Suhas Savkoor



If you have configured coredump for an ESXi host, you come across two methods. The first is configuring coredump to a partition, and the other is configuring coredump to a file.

Let's take a scenario, where we had initially configured coredump to a partition, and for some reason we decide to migrate to coredump to file. When we do this, we see the coredump to partition is still Active and Configured.

When you Disable and Unconfigure coredump to partition, it get's auto activated back when the ESXi host is rebooted.
Then, we have coredump to partition active and configured as well coredump to file configured and active.

I performed the below test and a work around for this situation:

1. I had my coredump configured to partition initially.
   


2. I unconfigured the coredump to partition
   


3. I configured coredump to file
   


4. I activated the coredump to file
   


5. Next, we can see the coredump to partition is not active and not configured whereas coredump to file is active and configured


6. I rebooted the ESXi and host, and then when I view the configuration I see both the coredump to partition and file is active and configured


7. What I am going to do next is add the force disable coredump to partition on next reboot of ESXi host. In this case, when the coredump is configured to file, the coredump to partition is never activated when the host is rebooted. This is done by adding the coredump to partition unconfigure parameter in the local.sh file

   

The configuration file looks similar to this:

    # local configuration options

    # Note: modify at your own risk!  If you do/use anything in this
    # script that is not part of a stable API (relying on files to be in
    # specific places, specific tools, specific output, etc) there is a
    # possibility you will end up with a broken system after patching or
    # upgrading.  Changes are not supported unless under direction of
    # VMware support.

    exit 0

Add the following parameters in the file, so that the file is updated as:

    # local configuration options

    # Note: modify at your own risk!  If you do/use anything in this
    # script that is not part of a stable API (relying on files to be in
    # specific places, specific tools, specific output, etc) there is a
    # possibility you will end up with a broken system after patching or
    # upgrading.  Changes are not supported unless under direction of
    # VMware support.

    /bin/esxcli system coredump partition set -e 0
    /bin/esxcli system coredump partition set -u
    /bin/esxcli system coredump partition set -e 0

    exit 0

Save this configuration file.

8. Reboot the ESXi host. And this time when you check for coredump to partition it is no longer configured and active. The coredump to file is only configured and active as required.