VMware Cloud Community
aj7860023
Contributor
Contributor

Logs not retained after reboot in ESXI 6.7

I have installed ESXI 6.7 on a dell power edge server. One issue that I can't seem to fix is that the host logs are lost after a reboot of the Host. The log files are being stored on scratch location which is on the datastore. I'm really puzzled why the logs are not maintained.

0 Kudos
12 Replies
SureshKumarMuth
Commander
Commander

please post the output of the following command

vim-cmd hostsvc/advopt/view ScratchConfig.ConfiguredScratchLocation

Regards,
Suresh
https://vconnectit.wordpress.com/
0 Kudos
aj7860023
Contributor
Contributor

I get the following response:

[root@localhost:~] vim-cmd hostsvc/advopt/view ScratchConfig.ConfiguredScratchLo

cation

(vim.option.OptionValue) [

   (vim.option.OptionValue) {

      key = "ScratchConfig.ConfiguredScratchLocation",

      value = "/vmfs/volumes/5b64d4f2-9377eaa4-2261-90b11c039811"

   }

]

0 Kudos
larstr
Champion
Champion

..and you can't find any logs there?

ls "/vmfs/volumes/5b64d4f2-9377eaa4-2261-90b11c039811"

0 Kudos
SureshKumarMuth
Commander
Commander

from root directory if you type cd /scratch . where it take you to /tmp or to the datastore which is configured

can you post that output

1. cd /scratch

2. pwd

Regards,
Suresh
https://vconnectit.wordpress.com/
0 Kudos
aj7860023
Contributor
Contributor

Suresh this is the response that I get:

esxi.PNG

0 Kudos
SureshKumarMuth
Commander
Commander

settings wise I dont see any issues, its very strange that the logs are getting deleted after reboot. Can you try to change the scratch partition location to /tmp and reconfigure again pointing to the datastore , check if that helps if you have not tried already.

Regards,
Suresh
https://vconnectit.wordpress.com/
0 Kudos
aj7860023
Contributor
Contributor

Basically i can't get the logs before the system reboot

0 Kudos
aj7860023
Contributor
Contributor

would you have any guide to follow for changing the scratch partition location ?

0 Kudos
SureshKumarMuth
Commander
Commander

So you mean to say , currently the logs are not written on scratch ? then it is a config issue, try to reconfigure , you may follow this article

http://www.vmwarearena.com/how-to-configure-scratch-partition-in-vmware-esxi-using-web-client/

Regards,
Suresh
https://vconnectit.wordpress.com/
0 Kudos
SureshKumarMuth
Commander
Commander

you may also try to restart the syslog service once before changing the settings

https://captainvops.com/2017/02/20/restarting-syslog-service-on-esxi/

Regards,
Suresh
https://vconnectit.wordpress.com/
0 Kudos
aj7860023
Contributor
Contributor

when I  try the command '# ps -Cc | grep vmsyslogd' and also the local log output parameter is false as can be seen in the screenshot below. I tried the method to restart the syslog service but it didn't help.
esxi2.PNG

0 Kudos
aj7860023
Contributor
Contributor

I tried to reconfig the scratch location also but still the ESXI host does not save the logs after a reboot. Also the Local log output is configured as false

0 Kudos