Ӕ Central

Welcome to the hidden lair of AE Central. From cars and beer to hardcore software development, you might find interesting topics in all areas. Feel free to browse!

To menu | To search

Redirect ESXi logs to a local datastore

, 23:01 - Permalink

ESXi.pngBy default, ESXi stores all of its vital logs on a non-persisting location. This means if the host crashes, reboots or shuts down no information is available on the root cause. Let's see how to change this.
All information has been gathered from the VMware knowledgebase. However ESXi is using an idiotic format, and I had troubles trying to set the new log directory via the vSphere Client.
There are two options available:
1, Setting new syslog location using SSH and esxcli
This was the was I went on with. First, enable SSH by Configuration > Security Profile. On the Services section click on Properties... link and select SSH. Click on the Options... and then the Start button. Voila, your ESXi host is now reachable through SSH. The only thing left now is to connect to your host with SSH and execute the command:
esxcli system syslog config set --logdir=/path/to/vmfs/directory/
To apply the changes, enter:
esxcli system syslog reload
2, Setting new syslog location using vSphere Client
This is the easier solution, but the naming convention confused me a lot. Go to Configuration, and in the Software section click on the Advanced Settings link. Scroll down to Syslog and find the option called Syslog.global.logDir and enter the value:
[Data Store Name] Folder
Now, let's say your data store is called "DataStore" and your folder is called "Logs". What you'll have to enter is:
[DataStore] Logs
...including the brackets and a space (?!)
Don't ask, but it works.


1. On 2017.09.19, 20:00 by Dorine

Appreciate this post. Let me try it out.

2. On 2017.11.09, 17:52 by mobile cheats

Admiring the time and energy you put into your blog and in depth information you offer.

It's good to come across a blog every once in a while that isn't
the same outdated rehashed information. Great read! I've bookmarked your site and I'm adding your RSS feeds to my Google account.

3. On 2017.11.09, 19:25 by Johnette

Fantastic website. Lots of useful info here. I'm sending
it to some pals ans additionally sharing in delicious.
And certainly, thank you to your sweat!

Add a comment

HTML code is displayed as text and web addresses are automatically converted.

This post's comments feed