8.7.4 Ensure VM log file size is limited

Information

Normally a new log file is created only when a host is rebooted, so the file can grow to be
quite large. You can ensure that new log files are created more frequently by limiting the
maximum size of the log files. If you want to restrict the total size of logging data, VMware
recommends saving 10 log files, each one limited to 1 MB. If the maximum number of log
files already exists, when a new one is created, the oldest log file is deleted.


*Rationale*

Virtual machine users and processes can abuse logging either on purpose or inadvertently
so that large amounts of data flood the log file. Without restrictions on maximum log file
size, over time a log file can consume enough file system space to cause a denial of service.

Solution

To properly limit the maximum log file size, run the following PowerCLI command:

# Add the setting to all VMs
Get-VM | New-AdvancedSetting -Name 'log.rotateSize' -value '1024000'

See Also

https://workbench.cisecurity.org/files/2168

Item Details

Category: AUDIT AND ACCOUNTABILITY

References: 800-53|AU-4, CSCv7|6.4

Plugin: VMware

Control ID: 7df1ef62dfbebc462e62c08d6a9882932bd2ed5aa23c812b2d8554730b5fd297