Search the VMware Knowledge Base (KB)
View by Article ID

Log rotation and logging options for vmware.log (8182749)

  • 19 Ratings

Details

This article describes the configurable options that are available for a virtual machine vmware.log file.

This log file records information specific to a running instance of a virtual machine, such as startup configuration, operations, and shutdown of the virtual machine.

Solution

There are four options you can use to change virtual machine logging and log rotation behaviors:
Notes:

The logging setting

The logging setting allows you to turn logging on or off.

To turn logging to off, enter logging=false in the virtual machines .vmx file. To turn logging back on, change logging=false to logging=true.

The log.rotateSize setting

By default, the virtual machine log file vmware.log is rotated as a result of the virtual machine's Power On or Power Off operation.

To configure log rotation based on file size, include this option in the virtual machines .vmx file:

log.rotateSize = maximum size in bytes the file can grow to

This example specifies the vmware.log file to be rotated when its size reaches 182 kilobytes:

log.rotateSize = 186368


Note: log.rotateSize is not available for vmx use in certain versions of ESXi 5.1 and 5.5. Adding this option in the virtual machine configuration file (.vmx) file does not have any effect. For more information, see the Security section of the vSphere 5.1 Update 3 Release Notes.

The log.keepOld setting

By default, all versions of ESX and ESXi from 3.0 through 6.0 keep 6 rotations of the vmware.log file vmware.log, vmware-1.log, vmware-2.log, ... etc.

To change the level of rotation, use the log.keepOld option in the virtual machines .vmx file.

This example specifies the level of rotation to be 10:

 log.keepOld = 10

The log.fileName setting

To specify an alternative location or filename for virtual machine logging, use the log.fileName option in the virtual machines .vmx file.

This example specifies myVMlog as the new file for logs instead of the default vmware.log:

log.fileName = myVMlog

This example directs logs to be written to an alternate directory called myVM in a different VMFS volume, vol1:

log.fileName = /vmfs/volumes/vol1/myVM/myVM.log

Additional Information

For translated versions of this article, see:

Update History

03/12/2015 - Added ESXi 6.0 to Products. Updated note regarding the log.rotateSize setting in vmx files.

Request a Product Feature

To request a new product feature or to provide feedback on a VMware product, please visit the Request a Product Feature page.

Feedback

  • 19 Ratings

Did this article help you?
This article resolved my issue.
This article did not resolve my issue.
This article helped but additional information was required to resolve my issue.

What can we do to improve this information? (4000 or fewer characters)




Please enter the Captcha code before clicking Submit.
  • 19 Ratings
Actions
KB: