6.0.1

Table Of Contents
Configuring Logging Levels for the Guest Operating System
Virtual machines can write support and troubleshooting information into a virtual machine log file stored
on a VMFS volume. The default settings for virtual machines are appropriate for most situations.
If your environment relies heavily on using VMotion, or if the defaults do not seem suitable for other
reasons, you can modify the logging settings for virtual machine guest operating systems.
New log file creation happens as follows:
n
Each time you power on or resume a virtual machine, and each time you migrate a virtual machine
with VMotion, a new log file is created.
n
Each time an entry is written to the log, the size of the log is checked. If vmx.log.rotateSize is set to a
nondefault value, and the size is over the limit, the next entry is written to a new log. If the maximum
number of log files exists, the oldest log file is deleted.
The default for vmx.log.rotateSize is zero (0), which means new logs are created during power on, resume,
and so on. You can ensure new log file creation happens more frequently by limiting the maximum size of
the log files with the vmx.log.rotateSize configuration parameter.
VMware recommends saving 10 log files, each one limited to no less than 2MB. These values are large
enough to capture sufficient information to debug most problems. If you need logs for a longer time span,
you can set vmx.log.keepOld to 20.
Change the Number of Virtual Machine Log Files
You can change the number of the log files for all virtual machines on an ESXi host or for individual virtual
machines.
This procedure discusses limiting the virtual machine log file number on an individual virtual machine.
To limit the number of log files for all virtual machines on a host, edit the /etc/vmware/config file. If the
vmx.log.KeepOld property is not defined in the file, you can add it. For example, to keep ten log files for each
virtual machine, add the following to /etc/vmware/config:
vmx.log.keepOld = "10"
You can use a PowerCLI script to change this property on all the virtual machines on a host.
You can use the log.keepOld parameter to affect all log files, not just the virtual machine log files.
Prerequisites
Turn off the virtual machine.
Procedure
1 Find the virtual machine in the vSphere Web Client inventory.
a Select a data center, folder, cluster, resource pool, or host.
b Click the Related Objects tab and click Virtual Machines.
2 Right-click the virtual machine and click Edit Settings.
3 Select VM Options.
4 Click Advanced and click Edit Configuration.
5 Add or edit the vmx.log.keepOld parameter to the number of files to keep for this virtual machine.
For example, to keep 20 log files and begin deleting the oldest files as new ones are created, enter 20.
6 Click OK.
Chapter 10 System Log Files
VMware, Inc. 167