To prevent virtual machine users and processes from creating large numbers of log files, which can lead to denial of service, you can limit the number of the log files for a virtual machine. You cannot limit the log file size for individual virtual machines.
Before you begin
Turn off the virtual machine.
About this task
You can limit the number of log files for all virtual machines on a host by editing the /etc/vmware/config file. If the
vmx.log.KeepOld property is not defined in the file, you can add it. For example, to keep ten log files for each virtual machine, add the following to /etc/vmware/config:
vmx.log.keepOld = "10"
You can also use a PowerCLI script to change this property on all the virtual machines on a host.
- Find the virtual machine in the vSphere Web Client inventory.
- To find a virtual machine, select a datacenter, folder, cluster, resource pool, or host.
- Click the Related Objects tab and click Virtual Machines.
- Right-click the virtual machine and click Edit Settings.
- Select VM Options.
- Click Advanced and click Edit Configuration.
- Add or edit the vmx.log.keepOld parameter to specify the number of files to keep. For example, to keep 8 log files and begin deleting the oldest files as new ones are created, enter 8.
- Click OK.