System logs on ESXi host are stored on Non Persistent Storage








Are you trying to fix the warning message 'system logs on the host are stored on non-persistent storage'? 

This guide is for you.


Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to fix VMWare related errors.

In this case, you shall learn how to fix this VMWare error.


What causes system logs on the host are stored on non-persistent storage?

Sometimes, when we install the VMware ESXi to an SD card or USB stick, the yellow exclamation mark icon is displayed next to the hostname in the vCenter client console, and the following warning appears on the Summary tab:

System logs on host test.ibmimedia.com are stored on non-persistent storage.

The esx.problem.syslog.nonpersistent warning means that the system writes logs (scratch) to the non-persistent USB device and if we restart the host, they will not be saved.


Thus, in case of any host issues, we will not be able to examine its logs or provide any data to VMWare technical support team.

In order to remove the warning, we must change the log storage path to a local disk or a VMFS datastore in the ESXi host settings.


How to fix the problem of system logs on the host are stored on non-persistent storage?

To fix this warning, simply change the log storage path by following the steps below;

i. Start by opening the vSphere client and select the ESXi host with the warning in the Hosts & Clusters.

ii. Next, navigate to the Configure tab and click Advanced System Settings.

iii. In the list of advanced settings, we click Edit and type Syslog.global.logDir in the Filter field. Here we see, [] /scratch/log folder is used to store the ESXi logs.

iv. Then change the path in the Syslog.global.logDir variable to [youtVMFSdatastorename] /systemlogs.

v. Also, you must create /systemlogs folder on the VMFS datastore in advance. Otherwise, we will get this error: A general system error occurred: Internal error.

vi. If the Syslog.global.logDir field is empty, check the value of the ScratchConfig.CurrentScratchLocation parameter. It shows the path to the scratch partition containing logs.

We can also change the log path using the PowerCLI command prompt:

get-vmhost ny-esxi21 | Get-AdvancedSetting -Name “Syslog.global.logDir” | Set-AdvancedSetting -Value "[HQVMFSDatastore1] /system_log_folder_name"

Additionally, change the value of Syslog.global.logDir using the Host Profiles. We can apply this profile to all ESXi hosts in the datacenter.


How to Verify the Location of System Logs in vSphere Web Client?

First, we browse to host in the vSphere Web Client navigator.

Next, we click the Manage tab and then click Settings.

Under System, we click Advanced System Settings

We ensure that Syslog.global.logDir points to a persistent location.

Also, we ensure that the field ScratchConfig.CurrentScratchLocation shows a location on persistent storage if the field Syslog.global.logDir is empty or points to a scratch partition.

If the folder is used as a scratch location is to be shared by multiple ESXi hosts, we must also set the field Syslog.global.logDirUnique to avoid contention over log files.

 

Verifying the Location of System Logs in vSphere Client (vSphere 6.0 and earlier)

i. First, we select a host in the inventory panel in the vSphere Client.

ii. Next, we click the Configuration tab and then we click Advanced Settings under Software.

iii. Also, we ensure that Syslog.global.logDir points to a persistent location.

iv. Then, specify the directory as [datastorename] path_to_file where the path is relative to the datastore. For example, [datastore1] /systemlogs.

v. Also, we ensure that the field ScratchConfig.CurrentScratchLocation shows a location on persistent storage if the field Syslog.global.logDir is empty or explicitly points to a scratch partition.

vi. If a working host has its information for the scratch location in a UUID format:

/vmfs/volumes/xxxxxxxx-xxxxxxxx-xxxx-xxxxxxxxxxxx/foldername and want to find out what the "friendly" name is, as it would appear in vCenter or host client view, you can do the following:

1. Connect to the working host via an SSH session, and log on with root credentials

2. Execute the command:

# esxcli storage filesystem list

3. The output will look similar to this:

/vmfs/volumes/ad495351-37d00fe1-c498-a82a75e0c050 abc-lun3 ad495451-37d00fe1-c498-a82a72e0c050 true VMFS-5 805038932144 400613703380


[Need any further assistance in fixing VMWare errors? – We are available to help you today.]



Conclusion

This article will help to fix VMWare warning message "System logs on ESXi host are stored on Non-Persistent Storage".


For Linux Tutorials

We create Linux HowTos and Tutorials for Sys Admins. Visit us on LinuxAPT.com

Also for Tech related tips, Visit forum.outsourcepath.com or General Technical tips on www.outsourcepath.com