ESXi server logs are stored locally by default on each host in the /var/log
directory. In certain cases, there is a requirement to store logs on a datastore.
Possible scenarios are hosts without local storage, where all locally stored logs disappear after reboot, compliance requirements where there is a requirement to store logs in an alternative location, or space concerns where there are many hosts and the administrator has to keep older logs.
vCenter allows redirecting ESXi logs to one of the datastores accessible to the host. This can be accomplished by going to Configuration | Advanced Settings | Syslog by changing the variable Syslog.global.logDir
to an appropriate value [Datastore]/Folder:
In vCenter Web Client, these options can be found by going to Host | Manage | Settings | Advanced System Settings, as shown in the following figure:
Once this change is made, you will see log files created in the configured folder if you browse the datastore.
From the same Advanced Settings section, you can configure the additional logging options:
The same logging parameters can also be configured from the ESXi command line using the esxcli system syslog
command.
For example, to validate logging settings configured from vCenter use:
esxcli system syslog config get
VMware KB 2003322 gives more details about configuring syslog, including CLI command sequence, which is available at http://kb.vmware.com/kb/2003322.