To prevent virtual machine users and processes from flooding the log file, which can lead to denial of service, you can limit the number and size of the log files ESXi generates.


Log in to a vCenter Server system using the vSphere Client.


On the Summary tab, click Edit Settings.


Select Options > General Options and make a record of the path displayed in the Virtual Machine Configuration File text box.


Log into the ESXi Shell and acquire root privileges.


Change directories to access the virtual machine configuration file whose path you recorded in Step 3.

Virtual machine configuration files are located in the /vmfs/volumes/datastore directory, where datastore is the name of the storage device on which the virtual machine files reside. For example, if the virtual machine configuration file you obtained from the Virtual Machine Properties dialog box is [vol1]vm-finance/vm-finance.vmx, you would change to the following directory.


To limit the log size, use a text editor to add or edit the following line to the .vmx file, where maximum_size is the maximum file size in bytes.


For example, to limit the size to around 100KB, enter 100000.


To keep a limited number of log files, use a text editor to add or edit the following line to the .vmx file, where number_of_files_to_keep is the number of files the server keeps.


For example, to keep 10 log files and begin deleting the oldest ones as new ones are created, enter 10.


Save your changes and close the file.