No coredump target has been configured. Host dumps cannot be saved (ESXi 5.5)
Stupid little me - removed a storage device on which the coredump target partition was defined. Therefore: "No coredump target has been configured. Host coredump cannot be saved". No idea what to do with such a dump, but I do not like issues with my ESXi hosts, so I set out to fix it. The specific problem I was facing, is not a missing definition of the diagnostics coredump target, but that my target was pointing at a missing storage device.
Disclaimer: Not an vCLI or ESXi expert. Please consult proper expert or other sources before doing anything on your setup.
My Samsung HD502HJ is no more (would have kept it, if I have know the amount of nonsense to define this coredump target again) First you will need to de-activate the old (wrongfully) target, and then create a new one and activate it: 0) De-activate 1) Create partition for the diagnostics coredump, and 2) Creating and activating a new partition. These tasks cannot be fixed from the vSchere client. You will have to go vCLI.
0. De-activating
Something is wrong with the current configuration:
~ # esxcli system coredump partition get
Not a known device: t10.ATA_____SAMSUNG_HD[ ... ]06522______
~ #
Also an message is dispalyed on the vSphere client. As this disk is not comming back, it must be de-activated as coredump partition.
~ # esxcli system coredump partition set --unconfigure
~ #
Produce no result, but you can try to get the coredump partition again and get a different result this time:
~ # esxcli system coredump partition get
Active:
Configured:
~ #
The coredump target is not pointing at the missing disk any more (It looks like you cannot create a new coredump partition as long as you get the "Device not know" message)
1. Creating and activating a new partition
A new disk is installed and found by the host:
ls -l /vmfs/devices/disks/
...
-rw------- 1 root root 2000398934016 Dec 25 16:02 t10.ATA_____ST2000DL[ ... ]40GT
...
No partitions is defined for this disk:
~ # partedUtil "getptbl" "/vmfs/devices/disks/t10.ATA_____ST2000DL[ ... ]40GT"
gpt
243201 255 63 3907029168
243201 | cylinders |
255 | heads |
63 | sectors pr. track |
3907029168 | sectors |
This disk has 512 bytes per sector, so this disk is 3907029168 x 512 = 2000398934016 (1863 GB)
On this disk, I will create only one partition with vCLI: The VMKCore Diagnostic. It turnes out, that you can use the vSphere client for the rest of the disk. You properly want to use it as a VMFS Datastore partition. The first will be around 300 MB, and the datastore will use the rest.
When using partedUtil setptbl to create a partition, you cannot use something as simply as size. You need to calculate the size from the start and end sector. So 300 Mb = 314572800 bytes. With 512 byts pr sector, we need (262144000/512) 614400 sectors. Should be around 110 Mb.
partedUtil setptbl "/vmfs/devices/disks/[DISK]" gpt "[Number] [Start sector] [End sector] [GUID] [Attribut]"
The VMKCore Diagnostic partition (shorten the disk name)
[DISK] | /vmfs/devices/disks/t10.ATA_____ST2000DL[ ... ]40GT |
[Number] | 1 |
[Start sector] | 128 |
[End sector] | 614528 (128 + 614400) |
[GUID] | 9D27538040AD11DBBF97000C2911D1B8 (vmkDiagnostic) |
[Attribut] | 0 (Not sure. 128 indicates that the partition is bootable) |
Creating a new coredump partition with partedUtil (shorten the disk name)
~ # partedUtil "setptbl" "/vmfs/devices/disks/t10.ATA_____ST2000DL[ ... ]40GT" gpt "1 128 614528 9D27538040AD11DBBF97000C2911D1B8 0"
gpt
0 0 0 0
1 128 614528 9D27538040AD11DBBF97000C2911D1B8 0
~ # partedUtil "getptbl" "/vmfs/devices/disks/t10.ATA_____ST2000DL[ ... ]40GT"
gpt
243201 255 63 3907029168
1 128 614528 9D27538040AD11DBBF97000C2911D1B8 vmkDiagnostic 0
~ #
And again the coredump partition list (shorten the disk name):
~ # esxcli system coredump partition list
Name Path Active Configured
-------------------------- ---------------------------------------------- ------ ----------
t10.ATA_____ST200[...]GT:1 /vmfs/devices/disks/t10.ATA_____ST200[...]GT:1 false false
mpx.vmhba32:C0:T0:L0:7 /vmfs/devices/disks/mpx.vmhba32:C0:T0:L0:7 false false
~ #
As only one vmkDiagnostic partition is defined, it should be possible to use (the only) automatic option for activating the diagnostic partition.
~ # esxcli system coredump partition set --enable true --smart
~ #
Your coredump partition should be activated and configured now.
~ # esxcli system coredump partition list (shorten the disk name)
Name Path Active Configured
-------------------------- ---------------------------------------------- ------ ----------
t10.ATA_____ST200[...]GT:1 /vmfs/devices/disks/t10.ATA_____ST200[...]GT:1 true true
mpx.vmhba32:C0:T0:L0:7 /vmfs/devices/disks/mpx.vmhba32:C0:T0:L0:7 false false
~ #
After your coredump partition is OK again, you should also add the rest of the disk. For some strange reason, this can be done from the vSphere client. The vSphere client allows you to only use "Free space" i.e. space not use by the coredump partition when adding the disk.