Adjusting the amount of hostd log files

less than 1 minute read

There was a question posted on the VMware Community Forums regarding the ability to increase the number of hostd log files.  Here is the solution I provided:

To change the max amount of log files for hostd you will need to edit /etc/vmware/hostd/config.xml. In the file you will find the following section:

<log>
  <directory>/var/log/vmware/</directory>
  <name>hostd</name>
  <outputToConsole>false</outputToConsole>
  <level>verbose</level>
</log>

You will want to add <maxFileNum>numberLogs</maxFileNum> like so:

<log>
  <directory>/var/log/vmware/</directory>
  <name>hostd</name>
  <outputToConsole>false</outputToConsole>
  <level>verbose</level>
  <maxFileNum>10</maxFileNum>
</log>

Your logs, however, should have multiple gzipped versions or rotated logs in /var/log/vmware. You will probably see /var/log/vmware/hostd-#.log.gz in there. If you do then you can view those logs with the following command:

zless /var/log/vmware/hostd-1.log.gz

Leave a Comment