When an event such as a vSphere HA failover occurs, default log settings may cause clomd and vsantrace logs to rotate within a short period (typically within hours to less than a day). This can result in the loss of critical information required for Root Cause Analysis (RCA).
Symptoms include:
This article provides steps to increase the log file size and rotation count to preserve diagnostic data for future occurrences.
VMware vSAN 7.0.x
VMware vSAN 8.0.x
The default log rotation settings (file size and generation count) are insufficient relative to the system's workload and high log generation rate.
To prepare for future occurrences, implement the following configuration changes on each ESXi host:
The clomd log is managed by the ESXi syslog framework.
esxcli system syslog config logger list | grep -A4 "clomd.log"
Example Output:
Destination: clomd.log
ID: clomd
Rotation Size: 1024
Rotations: 8
esxcli system syslog config logger set --id=clomd --size=1024 --rotate=10
esxcli system syslog reload
vsantrace is managed by a framework separate from syslog. By default, traces are stored in the RAM disk (/vsantraces).
To increase the number of retained files without causing memory exhaustion, it is strongly recommended to redirect the output to a local persistent datastore.
mkdir /vmfs/volumes/[DatastoreName]/vsantraces_extended/
esxcli vsan trace set -p /vmfs/volumes/[DatastoreName]/vsantraces_extended/ -f 64 -d 32 --lsom-verbose-num-files=64
esxcli vsan trace get
Example Output:
VSAN Traces Directory: /vmfs/volumes/localdisk01/vsantraces_extended/
Number Of Files To Rotate: 64
Maximum Trace File Size: 45 MB
Log Urgent Traces To Syslog: true
Number of DOM Trace Files To Rotate: 32
Maximum DOM Trace File Size: 10 MB
Number of LSOM Trace Files To Rotate: 8
Maximum LSOM Trace File Size: 22 MB
Number of LSOM Verbose Trace Files To Rotate: 64
Maximum LSOM Verbose Trace File Size: 22 MB
Number Of PLOG Trace Files To Rotate: 8
Maximum PLOG Trace File Size: 22 MB
Observe the retention period of the generated log files over time and adjust the rotation parameters according to your actual environment's requirements.
Run the following command to ensure the changes persist across host reboots:
/sbin/auto-backup.sh
vsantrace rotation limits will significantly inflate the size of the ESXi log bundle (vm-support).