VMCH-70-000027 - Log retention must be configured properly on the virtual machine (VM).

Information

The ESXi hypervisor maintains logs for each individual VM by default. These logs contain information including but not limited to power events, system failure information, tools status and activity, time sync, virtual hardware changes, vMotion migrations, and machine clones.

By default, 10 of these logs are retained. This is normally sufficient for most environments, but this configuration must be verified and maintained.

Solution

From the vSphere Client, select the Virtual Machine, right-click and go to Edit Settings >> VM Options tab >> Advanced >> Configuration Parameters >> Edit Configuration.

Find the 'log.keepOld' value and set it to '10'.

Note: The VM must be powered off to modify the advanced settings through the vSphere Client. It is recommended to configure these settings with PowerCLI as this can be done while the VM is powered on. In this case, the modified settings will not take effect until a cold boot of the VM.

or

From a PowerCLI command prompt while connected to the ESXi host or vCenter server, run the provided commands as shown below.

If the setting does not exist, run:

Get-VM 'VM Name' | New-AdvancedSetting -Name log.keepOld -Value 10

If the setting exists, run:

Get-VM 'VM Name' | Get-AdvancedSetting -Name log.keepOld | Set-AdvancedSetting -Value 10

See Also

https://dl.dod.cyber.mil/wp-content/uploads/stigs/zip/U_VMW_vSphere_7-0_Y24M01_STIG.zip

Item Details

Category: CONFIGURATION MANAGEMENT

References: 800-53|CM-6b., CAT|II, CCI|CCI-000366, Rule-ID|SV-256475r886468_rule, STIG-ID|VMCH-70-000027, Vuln-ID|V-256475

Plugin: VMware

Control ID: a23db51229b10b80dabb7c0a6af70ab34bf5cd24bdf935a65f860803bd9b4790