In this post we will look into how to configure Core Dump settings on Esxi hosts. But before doing that lets talk a bit about what is core dump.
What is Core Dump?
A core dump is the state of working memory of an Esxi host in the event of host failure like Purple Screen Of Death aka PSOD. In the event of PSOD the state of the VMkernel Memory is sent to the server where where dump collector service is running. This server is typically your vCenter server.
Core dumps information are very important when it comes to identifying and troubleshooting the issue which made the ESXi host to show a purple screen.
By default, a core dump is saved to the local disk. You can use ESXi Dump Collector to keep core dumps on a network server for use during debugging. The core Dump resides in a Diagnostic partition and in-order to create a partition we require atleast 100 MB of free space either locally or remotely available disks.
Some facts about core dump:
1: The Core dump Server service works on UDP Port (1025-9999) and uses port 6500 as default.
2: Network dump collector will not work if the management VMKernel port has been configured to use Etherchanel/LACP
3: The name of the protocol which is used for sending core dumps from failed ESXi to the Dump collector service is netdump.
4: Core Dump collector is not supported over IPv6 and only supports IPV4.
The network traffic is not encrypted and no authentication mechanism to make sure the integrity and validity of the data being received by the Dump Collector Service.
How to configure Core Dump on Esxi hosts?
There are various ways of configuring core dump settings on Esxi host which includes esxcli command, host profiles, from Web-Client, PowerCli and/or any other scripting method.
In this post I will only discuss about esxcli and host profile method. Let’s get started.
Before firing any commands on Esxi hosts to enable/configure coredump service, we first have to start coredump service on network server (vCenter server) where Esxi host will send the coredumps.
To do so login to vCenter Web-Client and navigate to Home > Administration > System Configuration > Services and select the Esxi Dump Collector service and click on Actions tab to enable the service.
Once coredump service has been enabled, you will now see option to start the service under Actions menu.
Configuring Core Dump using esxcli utility
Available option for coredump network namespace
1 2 3 4 5 6 |
[root@esxi01:~] esxcli system coredump network Usage: esxcli system coredump network {cmd} [cmd options] Available Commands: check Check the status of the configured network dump server get Get the currently configured parameters for network coredump, if enabled. set Set the parameters used for network core dump |
Verify if coredump service is enabled on esxi host
1 2 |
[root@esxi01:~] esxcli system coredump network check Network coredump not enabled |
Retrieve current configuration for coredump service
1 2 3 4 5 6 |
[root@esxi01:~] esxcli system coredump network get Enabled: false Host VNic: Is Using IPv6: false Network Server IP: Network Server Port: 0 |
From the above two output its evident that coredump service has not been enabled/configured on host.
Configure ESXi host to use the ESXi Dump collector service.
1 |
[root@esxi01:~] esxcli system coredump network set --interface-name vmk0 --server-ipv4 192.168.109.20 --server-port 6500 |
Where 192.168.109.20 is the IP address of my vCenter Server
Enable ESXi Dump Collector
1 |
[root@esxi01:~] esxcli system coredump network set --enable true |
Retrieve core dump settings again to verify.
1 2 3 4 5 6 |
[root@esxi01:~] esxcli system coredump network get Enabled: true Host VNic: vmk0 Is Using IPv6: false Network Server IP: 192.168.109.9 Network Server Port: 6500 |
Now if we check the service status, it will be reported as running
1 2 |
[root@esxi01:~] esxcli system coredump network check Verified the configured netdump server is running |
Configuring Coredump via Host profile
Edit your host profile and expand Networking Configurations section and select Network Coredump Settings. At this point you will see that this service has not been enabled/configured.
Enable the service and specify the Host NIC which will be used to send coredump to target server in case of PSOD situation. Also specify the IP Address/Port of the server where Coredump Collector service is running.
At this point it is expected for cluster/hosts to be non-compliant with host profile.
Remediate hosts and verify the compliance status of host/cluster to ensure coredump settings have been pushed on Esxi hosts.
Locating the Dump Collector Folder in vCenter 6
If you are using Windows based vCenter Server then the core dump folder can be location under path.
C:ProgramDataVMwarevCenterServerdatanetdump
The netdump-setup.xml file has the information about all the default paths. These settings can be very well edited and configured according to our requirement. Typically you will find below settings in this file:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
<Config> <defaultInstallPath>C:Program FilesVMwarevCenter Servernetdump</defaultInstallPath> <defaultConfigPath>C:ProgramDataVMwarevCenterServerdatanetdump</defaultConfigPath> <defaultLogPath>C:ProgramDataVMwarevCenterServerlogsnetdump</defaultLogPath> <defaultDataPath>C:ProgramDataVMwarevCenterServerdatanetdumpData</defaultDataPath> <serviceAddress>vcentersrv01.alex.local</serviceAddress> <defaultWebPort>8000</defaultWebPort> <defaultValues> <port>6500</port> <maxSize>2</maxSize> </defaultValues> <vCenterServer> <address>vcentersrv01.alex.local</address> <port>80</port> <user>root</user> </vCenterServer> <debug> <level>0</level> </debug> </Config> |
Note: If you are making any changes in this file then once the changes are done dump Collector service needs to be restarted for changes to take effect.
If you want to fancy your chances and want to enable coredump via PowerCli then please check Aaron Margeson Blogpost
Additional Sources:
Configure Dump Collector with PowerCLI in vSphere 6
VMware KB-1032051
How to resolve Cordump partition error in Esxi
I hope you enjoyed reading this post. Feel free to share this on social media if it is worth sharing. Be sociable 🙂