Search the VMware Knowledge Base (KB)
View by Article ID

Increasing VMware vCenter Server and VMware ESX/ESXi logging levels (1004795)

  • 60 Ratings

Purpose

This article provides steps to increase the size and number of the hostd, vpxa, and vpxd logs so that additional data is saved. This data may be useful for troubleshooting purposes.

The Management agent (hostd), VirtualCenter Agent Service (vpxa), and VirtualCenter (vpxd) logs are automatically rotated and maintained to manage their growth. Information in the logs can be lost if the logs are rotated too quickly.

Note: Rotation means the turn over of files. For example, if you set the maximum number of log files to 10, after every 10 log files, the numbering restarts at 0.

Each set of logs are found at these locations:
  • hostd
    • In ESXi/ESX 4.x hosts, hostd logs are located at /var/log/vmware/
    • In ESXi 5.x/6.0 hosts, hostd logs are located at /var/log/

  • vpxa
    • In ESXi/ESX 4.x hosts, vpxa logs are located at /var/log/vmware/vpx/
    • In ESXi 5.x/6.0 hosts, vpxa logs are located at /var/log/

  • vpxd logs are located in %ALLUSERSPROFILE%\Application Data\VMware\VMware VirtualCenter\Logs, which translates to:
    • Windows 2003: C:\Documents and Settings\All Users\Application Data\VMware\VirtualCenter\logs
    • Windows 2008: C:\ProgramData\VMware\VMware VirtualCenter\Logs
    • Windows 2012: C:\ProgramData\VMware\VMware VirtualCenter\Logs

Resolution

Caution: Enabling trivia or verbose logging for a longer duration might cause performance degradation on vCenter Server. Only enable trivia or verbose logging for troubleshooting purposes. VMware recommends reverting to default logging (info level) immediately after the troubleshooting is complete. VMware does not recommend enabling trivia/verbose logging in a production environment. Perform the steps in this article only after consulting VMware technical support.

Before you increase the size and number of logs: Caution: VMware does not recommend decreasing the number or size of logs from the default settings.

This article contains three sections:

hostd

For ESXi 5.x/6.0, you can increase hostd logging from the vSphere Client:
  1. Using the vSphere Client, connect to the vCenter Server.
  2. Click the ESXi 5.x host, then click Configuration.
  3. Click Software and then click Advanced Settings.
  4. In the Advanced Settings, go to Config > HostAgent > log.
  5. Update the config.HostAgent.log.level setting with the preferred logging level. For information on the different logging levels, see the Additional Information section.

    Note: The default logging level for config.HostAgent.log.level is verbose for ESXi 5.x and info for ESXi 6.0.
To increase logging for hostd
  1. Log in to your host as root from either an SSH session or directly from the console. For more information, see Using Tech Support Mode in ESXi 4.1 and ESXi 5.x (1017910) or Enabling root SSH login on an ESX host (8375637).
  2. Open the configuration file for hostd using a text editor.

    Note: The configuration file for hostd is found at/etc/vmware/hostd/config.xml.

    ESXi 5.x/6.0: To redirect logs to local disk instead of syslog for troubleshooting purposes, first change this line in the config.xml file (located at /etc/vmware/hostd/config.xml) to true.

    <!-- If true, log to files on disk -->
    <outputToFiles>false</outputToFiles>


    The file looks similar to:

    <config>
    :
    <log>
    <directory>/var/log/vmware/</directory>
    <level>verbose</level>
    <name>hostd</name>
    <outputToConsole>false</outputToConsole>
    <maxFileSize>52428800</maxFileSize>
    <maxFileNum>50</maxFileNum>
    </log>
    :
    </config>


    Description of each entry:

    • <directory>/var/log/vmware/</directory>

      Logging path

      Note: The <directory> entry can also be updated with a full path to a VMFS datastore. For example:

      <directory>/vmfs/volumes/<datastore name>/<log directory></directory>

      This may be useful on ESXi hosts where space is limited.

    • <level>verbose</level>

      Log Level. For ESXi/ESX 4.0 and later, the default log level is verbose. For ESXi/ESX 3.5 and earlier, the default level is info. Change it to the preferred logging level. For information on the different logging levels, see the Additional Information section.

    • <name>hostd</name>

      Prefix

    • <outputToConsole>false</outputToConsole>

      Console out

    • <maxFileSize>5242880</maxFileSize>

      Maximum size of each log file, in bytes.

    • <maxFileNum>50</maxFileNum>

      Maximum number of log files

  3. Increase the <maxFileSize> parameter to change the maximum size of the logs.
  4. Increase the <maxFileNum> parameter to change the maximum number of logs.
  5. Restart the hostd management agent (mgmt-vmware) for the change to take effect. For more information, see Restarting the Management agents on an ESXi or ESX host (1003490).

Note: In 5.x, hostd log output is set by default to output to syslog. In this case, the advanced settings Syslog.loggers.hostd.rotate and Syslog.loggers.hostd.size take precedence over the settings on the /etc/vmware/hostd/config.xmlfile.

To change the settings:
  1. Connect to the ESXi host with the vSphere Client.
  2. Under the Configuration tab and in the Software section, click Advanced Settings
  3. Click Syslog to expand.
  4. Click loggers to expand.
  5. Click hostd.
  6. Locate Syslog.loggers.hostd.rotate and Syslog.loggers.hostd.size.
  7. Use the text boxes to the right of the variable to adjust the setting.

Note: The default for 5.0.x is rotate 10 files with a size of 5120 KiB each. The default for 5.1.x and 5.5.x is rotate 10 files with a size of 10240 KiB each. When making changes here, you do not need to restart hostd because values are dynamically set on the host.

vpxa

To increase logging for vpxa:

To change the settings through the vSphere Client:
  1. Connect to the ESXi host in question with the vSphere Client.
  2. Select the Configuration tab and then click on Advanced Settings in the Software section.
  3. Expand Syslog then expand loggers, and then select vpxa.
  4. Locate Syslog.loggers.vpxa.rotate and Syslog.loggers.vpxa.size.
  5. Use the text boxes to the right of the variable to adjust the setting.

Note: The default for 5.0.x is rotate 10 files with a size of 5120 KiB each, the default for 5.1.x and 5.5.x is rotate 20 files with a size of 5120 KiB each. When making changes here do not need to restart vpxa because values are dynamically set on the host.

To change the setting from command line:
  1. Log in to your ESXi/ESX host as root from either an SSH session or directly from the console. For more information, see Using Tech Support Mode in ESXi 4.1 and ESXi 5.x (1017910) or Enabling root SSH login on an ESX host (8375637).
  2. Open the configuration file for vpxa in a text editor.

    Note: For ESX 3.5 through ESXi/ESX 4.1, the file is found at /etc/opt/vmware/vpxa/vpxa.cfg. For ESXi 5.x/6.0, the vpxa.cfg file is located at/etc/vmware/vpxa. In ESXi 5.0, the vpxa.cfg file is set to read-only.

    The file looks similar to:

    <config>
    :
    <log>
    :
    <maxFileNum>50</maxFileNum>
    <maxFileSize>5242880</maxFileSize>
    <level>verbose</level>
    </log>
    :
    </config>


    Description of each entry:

    • <maxFileNum>50</maxFileNum>

      Maximum number of log files

    • <maxFileSize>5242880</maxFileSize>

      Maximum size of each log file, in bytes. By default, the maximum file size is 5243904 bytes.

    • <level>verbose</level>

      Log Level. The default level is verbose. Change it to the preferred logging level. For information on the different logging levels, see the Additional Information section.

    Note: The <directory> entry can be added under the <log> heading, and can be updated with a full path to a VMFS datastore. For example:

    <directory>/vmfs/volumes/<datastore name>/<log directory></directory>

    This may be useful on ESXi hosts where space is limited.

  3. Increase the <maxFileSize> parameter to change the maximum size of the logs.
  4. Increase the <maxFileNum> parameter to change the maximum number of logs.
  5. Restart the vpxa management agent (vmware-vpxa) for the change to take effect. For more information, see Restarting the Management agents on an ESXi or ESX host (1003490).

Note: In 5.x/6.0, vpxa log output is set by default to output to syslog. In that case, the advanced settings Syslog.loggers.vpxa.rotate and Syslog.loggers.vpxa.size take precedence over the settings on the vpxa.cfg file.

For ESXi 5.x/6.0, you can increase vpxa logging from the vSphere Client:
  1. Using the vSphere Client, connect to the vCenter Server.
  2. Click the ESXi 5.x host, then click Configuration.
  3. Under Software, click Advanced Settings.
  4. In Advanced Settings, click Vpx > Vpxa > config > log.
  5. Update the Vpx.Vpxa.config.log.level setting with the preferred logging level. For information on the different logging levels, see the Additional Information section.

vpxd

To increase logging for vpxd on the vCenter Server, see Enabling trivia logging in vCenter Server (1001584).

If vCenter Server does not start, you must enable trivia logging manually.

To manually enable trivia logging:
  1. Log into vCenter Server as an administrator.
  2. Open the configuration file for vpxd in a text editor.

    Note: The configuration file for vpxd is found at:

    %ALLUSERSPROFILE%\Application Data\VMware\VMware VirtualCenter\vpxd.cfg

    In the vCenter Server Appliance, the vpxd.cfg file is located at: /etc/vmware-vpx/vpxd.cfg.

    For Windows 2008:

    C:\ProgramData\VMware\VMware VirtualCenter\vpxd.cfg

    For vCenter Server 6.0:

    C:\ProgramData\VMware\vCenterServer\cfg\vmware-vpx\vpxd.cfg

    For more information,  see Common vCenter Server and vSphere Client Windows paths (1028185).

    The file looks similar to:

    <config>
    :
    <log>
    <level>trivia</level>
    <maxFileNum>50</maxFileNum>
    <maxFileSize>5242880</maxFileSize>
    <directory>C:\vpxlog\</directory>
    <name>vpxd</name>
    </log>
    :
    </config>


    Description of each entry:

    • <level>trivia</level>

      Log Level. The default level is info. Change it to the preferred logging level. For information on the different logging levels, see the Additional Information section.

    • <maxFileNum>50</maxFileNum>

      Maximum number of log files

    • <maxFileSize>5242880</maxFileSize>

      Maximum size of each log file, in bytes. By default, the maximum file size is 5243904 bytes.

    • <directory>C:\vpxlog\</directory>

      Logging path

    • <name>vpxd</name>

      Prefix

  3. Increase the <maxFileSize> parameter to change the maximum size of the logs.
  4. Increase the <maxFileNum> parameter to change the maximum number of logs.
  5. Restart the VMware VirtualCenter Server service for the change to take effect. For more information, see Stopping, starting, or restarting vCenter services (1003895).
Notes:
vCenter Server logging level can also be increased using the vSphere Client.

To change the logging level using the vSphere Client:
  1. Connect the vSphere Client to vCenter Server.
  2. Go to Administration > vCenter Server Settings > Logging options.
  3. Select the preferable logging option from the dropdown. For information on the different logging levels, see the Additional Information section.
Note: Changes done to the logging level via the vSphere Client or vSphere Web Client do not persist after a reboot and are overwritten by the default values in the vpxd.cfg file. To make permanent log level modifications, you must edit the vpxd.cfg file.

Additional Information

For information about modifying the number and size of VMkernel logs retained in /var/log, see Controlling the size and number of vmkernel logs in ESX hosts (1037645).

For more information on logging options (None, Error, Warning, Info, Verbose, and Trivia), see:
For translated versions of this article, see:

Tags

increase-logging-level

See Also

Update History

04/05/2013 - Added note about changing the logging level using vSphere Client/Web Client

Request a Product Feature

To request a new product feature or to provide feedback on a VMware product, please visit the Request a Product Feature page.

Feedback

  • 60 Ratings

Did this article help you?
This article resolved my issue.
This article did not resolve my issue.
This article helped but additional information was required to resolve my issue.

What can we do to improve this information? (4000 or fewer characters)




Please enter the Captcha code before clicking Submit.
  • 60 Ratings
Actions
KB: