Loading

×Sorry to interrupt
CSS Error

Refresh

Cookie Preference Center

General Information on cookies

When you visit our website, we use cookies to ensure that we give you the best experience. This information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies by clicking on the different category headings to find out more and change your settings. However, blocking some types of cookies may impact your experience on the site and the services we are able to offer. Further information can be found in our

Cookie Policy.

Strictly Necessary

Strictly Necessary

Always Active

Strictly Necessary

Strictly necessary cookies are always enabled since they are essential for our website to function. They enable core functionality such as security, network management, and website accessibility. You can set your browser to block or alert you about these cookies, but this may affect how the website functions. For more information please visit www.aboutcookies.org or www.allaboutcookies.org.

Cookie Details‎

Performance

Performance

Performance

Performance cookies are used to analyze the user experience to improve our website by collecting and reporting information on how you use it. They allow us to know which pages are the most and least popular, see how visitors move around the site, optimize our website and make it easier to navigate.

Cookie Details‎

Please confirm your settings by refreshing the page.

Functional

Functional

Functional

Functional cookies help us keep track of your past browsing choices so we can improve usability and customize your experience. These cookies enable the website to remember your preferred settings, language preferences, location and other customizable elements such as font or text size. If you do not allow these cookies, then some or all of these services may not function properly.

Cookie Details‎

Advertising

Advertising

Advertising

Advertising cookies are used to send you relevant advertising and promotional information. They may be set through our site by third parties to build a profile of your interests and show you relevant advertisements on other sites. These cookies do not directly store personal information, but their function is based on uniquely identifying your browser and internet device.

Cookie Details‎

Advertising Cookies

Consent Leg.Interest

Select All Vendors

Select All Vendors

Select All Hosts

Select All

Clear Filters

Information storage and access

Apply

Confirm My Choices Reject All Allow All

Skip to main content

My Subscriptions

Loading

Knowledge Base

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

Last Updated: 8/16/2023Categories: How toTotal Views: 304790Language:
Chinese (Simplified)JapaneseEnglish

24 like this article

Subscribe to get an email
newsletter with new updates

24 people found this helpful Please provide article feedback:

Learn how VMware Skyline Advisor and Skyline Health Diagnostics work together to provide proactive intelligence and self-service log analysis.

Use Skyline Advisor to avoid issues before they occur across VCF, vSphere, vSAN, NSX, vROps & Horizon. Skyline Findings are based on top KBs, VMSAs/CVEs and design best practices.

Use Skyline Health Diagnostics to root cause vSphere & vSAN logs when an issue occurs. Skyline Health Diagnostic Findings are based on top KBs and VMSA/CVEs. You can use the Skyline Health Diagnostics tool in online or offline mode.

If you require additional help from technical support, please use Skyline Advisor to initiate a Log Assist to reduce time to upload logs. TSEs can also initiate logs to reduce effort.

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 and vpxa log location: /var/log/

vpxd logs on a vCSA/vCenter Appliance: /var/log/vmware

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:

Back up the configuration files.

Ensure that there is sufficient disk space available to accommodate the logs.

For important information on restarting the management agents, see Restarting the Management agents on an ESXi or ESX host (1003490).

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

This article contains three sections:

hostd

vpxa

vpxd

hostd

To increase hostd logging from the vCenter Server vSphere Client. Note: The default logging level for config.HostAgent.log.level is info for ESXi 6.x and 7.x.

Using the vSphere Client, connect to the vCenter Server.

Click the ESXi host, then click Configure.

Under System, click Advanced System Settings.

In the Advanced Settings view, click Edit in the top right.

In the Key column, filter for config.HostAgent.log.level.

In the Value column, set the preferred logging level. For information on the different logging levels, see the #AdditionalInformationsection.

Click OK to save.

To increase hostd logging from the command line.

Log in to your host as root from either an SSH session or directly from the console.

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 6.x: To redirect logs to the 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.

<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. This may be useful on ESXi hosts where space is limited. For example:
<directory>/vmfs/volumes/<datastore name>/<log directory></directory>

<level>info</level>

Logging level

<name>hostd</name>

Prefix

<outputToConsole>false</outputToConsole>

Console out

<maxFileSize>5242880</maxFileSize>

Maximum size of each log file in bytes

Increase the <maxFileSize> parameter to change the maximum size of the logs.

<maxFileNum>50</maxFileNum>

Maximum number of log files

Increase the <maxFileNum> parameter to change the maximum number of logs.

Restart the hostd management agent for the change to take effect. For more information, see Restarting the Management agents on an ESXi or ESX host (1003490).

Note: In 6.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 takes precedence over the settings on the /etc/vmware/hostd/config.xml file.

To change the settings:

Connect to the vCenter Server vSphere Client.

Click on the ESXi host.

Navigate to Configure > System >  Advanced System Settings.

Click Edit in the top right.

In the Key column, filter for Syslog.loggers.hostd.rotate and Syslog.loggers.hostd.size.

In the Value column, adjust the setting.

Click OK to save.

ESXi 7.0U2 and higher:

Starting in ESXi 7.0U2, changes to the logging level for hostd have changed and are accessible by running the tool /bin/configstorecli per How to change configuration settings for Hostd service in vSphere ESXi 7.0 Update 2 (82227)

vpxa

To increase vpxa logging from the vCenter Server vSphere Client. Note: The default logging level for config.HostAgent.log.level is info for ESXi 6.x and 7.x.

Using the vSphere Client, connect to the vCenter Server.

Click the ESXi host, then click Configure.

Under System, click Advanced System Settings.

In the Advanced Settings view, click Edit in the top right.

In the Key column, filter for Vpx.Vpxa.config.log.level.

In the Value column, set the preferred logging level. For information on the different logging levels, see the #AdditionalInformationsection.

Click OK to save.

To increase vpxa logging from the command line.

Log in to your host as root from either an SSH session or directly from the console.

Open the configuration file for vpxa in a text editor.

Note: For ESXi 6.x, the vpxa.cfg file is located at /etc/vmware/vpxa.

The file looks similar to:

<config>
:
<log>
:
<maxFileNum>50</maxFileNum>
<maxFileSize>5242880</maxFileSize>
<level>verbose</level>
</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. This may be useful on ESXi hosts where space is limited. For example:
<directory>/vmfs/volumes/<datastore name>/<log directory></directory>

<level>info</level>

Logging level

<maxFileSize>5242880</maxFileSize>

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

Increase the <maxFileSize> parameter to change the maximum size of the logs.

<maxFileNum>50</maxFileNum>

Maximum number of log files

Increase the <maxFileNum> parameter to change the maximum number of logs.

ESXi 7.0U3 and higher:

For ESXi 7.0 U3 and later, changes to the logging level for vpxa have changed and are accessible using the tool /bin/configstorecli, see vSphere ESXi 7.0 U3 VPXA configuration properties (87438)

Restart the hostd management agent for the change to take effect. For more information, see Restarting the Management agents on an ESXi or ESX host (1003490).

Note: In 6.x/7.x, 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 takes precedence over the settings on the vpxa.cfg file.

To change the settings:

Connect to the vCenter Server vSphere Client.

Click on the ESXi host.

Navigate to Configure > System >  Advanced System Settings.

Click Edit in the top right.

In the Key column, filter for Syslog.loggers.vpxa.rotate and Syslog.loggers.vpxa.size.

In the Value column, adjust the setting.

Click OK to save.

vpxd

To increase vpxd logging from the vCenter Server vSphere Client.

Using the vSphere Client, connect to the vCenter Server.

Select vCenter Server, for which you need to increase the logging level.

Go to Configure > Settings > General.

Click Edit for vCenter Server Settings.

Select Logging options.

Select the preferable logging option from the dropdown under Log Level. For information on the different logging levels, see the #AdditionalInformationsection .

Note: For more information, 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:

Log into vCenter Server as an administrator.

Edit the vpxd.cfg file located in /etc/vmware-vpx/vpxd.cfg.

The file looks similar to:

<log>
<compressOnRoll>true</compressOnRoll>
<level>info</level>
<maxFileNum>30</maxFileNum>
<maxFileSize>52428800</maxFileSize>
<outputToConsole>false</outputToConsole>
<outputToFiles>true</outputToFiles>
</log>

Description of each entry:

<level>info</level>

Logging level. The default level is info. Change it to the preferred logging level. For information on the different logging levels, see the #AdditionalInformationsection.

<maxFileNum>30</maxFileNum>

Maximum number of log files

Increase the <maxFileNum> parameter to change the maximum number of logs

<maxFileSize>5242880</maxFileSize>

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

Increase the <maxFileSize> parameter to change the maximum size of the logs.

Restart the VMware vCenter Server service for the change to take effect. For more information, see Stopping, starting, or restarting vCenter services (1003895).

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 section

Table showing different levels of logging:

Option

Description

None (Disable logging)

Turns off logging

Error (Errors only)

Displays only error log entries

Warning (Errors and warnings)

Displays warning and error log entries

Info (Normal logging)

Displays information, error, and warning log entries

Verbose (Verbose)

Displays information, error, warning, and verbose log entries

Trivia (Extended verbose)

Displays information, error, warning, verbose, and trivia log entries

Related 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).

Enabling trivia logging in VMware vCenter Server
Restarting the Management agents in ESXi
How to stop, start, or restart vCenter Server services
Enabling syslog on ESXi 3.5 and 4.x
Common vCenter Server and vSphere Client Windows paths
The vpxa management agent fills local logs in ESXi 4.1
Controlling the size and number of vmkernel logs in ESX hosts
VMware vCenter Server と VMware ESX/ESXi のログ レベルを上げる方法
次のエラーで hostd がセッションを使い果たし、ESX/ESXi ホストが切断される：SOAP session count limit reached
提高 VMware vCenter Server 和 VMware ESX/ESXi 日志记录级别
Enabling root SSH login on an ESX host

Detectable by VMware SkylineTM

Actions

Copy

link to clipboard
copied!

Print

Language:
Chinese (Simplified)JapaneseEnglish

Attachments

Additional Resources

No results for undefined

Ask The Community

Get answers quickly from VMware experts in the community

Post Subject

CONTINUE IN COMMUNITIES

Related Products:

VMware vSphere ESXi

VMware VirtualCenter

VMware vCenter Server

Related Versions:

VMware vSphere ESXi 7.0.0

VMware vSphere ESXi 6.5

VMware vSphere ESXi 6.0

VMware vCenter Server 7.0.x

VMware vCenter Server 6.7.x

VMware vCenter Server 6.5.x

VMware vCenter Server 6.0.x

Take Our Survey

Was this article helpful?

YES

NO

Copyright © 2005-2024 Broadcom. All Rights Reserved. The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries.

Terms of Use

Your California Privacy Rights

Privacy

Accessibility

Cookie Settings

Support Assistant