This article provides steps to change the number of logs per rotation and the size of the log file before it rotates.
Environment
VMware vSphere ESXi 7.X VMware vSphere ESXi 8.X
Resolution
To increase the number of logs per rotation and the size of the log file before it rotates using esxcli:
Open an SSH session to the ESXi host.
List current log files kinds and rotate parameters: esxcli system syslog config logger list
Modify the log rotate parameters (The --rotate parameter defines the number of log files to be saved, and the --size parameter defines the size of the log file): esxcli system syslog config logger set --id=<logger_name> --rotate=15 --size=10240 For example: Modify the vmkernel log rotate parameters: esxcli system syslog config logger set --id=vmkernel --rotate=15 --size=10240 Modify the hostd log rotate parameters: esxcli system syslog config logger set --id=hostd --rotate=15 --size=10240
Run 'esxcli system syslog reload' to apply the new configuration changes.