Purpose
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 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 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
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 highly 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:
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).
This article contains three sections:
hostd
To increase logging forhostd
:- 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).
- Open the configuration file for
hostd
in a text editor.
Note: The configuration file forhostd
is found at/etc/vmware/hostd/config.xml
.
ESXi 5.x only: To redirect logs to local disk instead of syslog for troubleshooting purposes, first change this line in theconfig.xml
file (located at/etc/vmware/hostd/config.xml
) totrue
.<!-- 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>5242880</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 isverbose
. For ESXi/ESX 3.5 and earlier, the default level isinfo
. 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. By default, the maximum file size is 5243904 bytes.<maxFileNum>50</maxFileNum>
Maximum number of log files
- Increase the
<maxFileSize>
parameter to change the maximum size of the logs. - Increase the
<maxFileNum>
parameter to change the maximum number of logs. - 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 settingsSyslog.loggers.hostd.rotate and Syslog.loggers.hostd.size take precedence over the settings on the/etc/vmware/hostd/config.xml file.
To change the settings:For ESXi 5.x, you can increase
- Connect to the ESXi host with the vSphere Client.
- Under the Configuration tab, in the Software section, click Advanced Settings.
- Click Syslog to expand.
- Click loggers, to expand.
- Click hostd.
- Locate Syslog.loggers.hostd.rotate and Syslog.loggers.hostd.size.
- 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 KiBeach. When making changes here do not need to restart hostd because values are dynamically set on the host.
hostd
logging from the vSphere Client:- Using the vSphere Client, connect to the vCenter Server.
- Click the ESXi 5.x host, then click Configuration.
- Under Software, click Advanced Settings.
- In the Advanced Settings, click Config > HostAgent > log.
- Update the config.HostAgent.log.level setting with the preferred logging level. For information on the different logging levels, see theAdditional Information section.
Note: The default logging level for config.HostAgent.log.level is verbose.
vpxa
To increase logging forvpxa
:- 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).
- 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, thevpxa.cfg
file is located at/etc/vmware/vpxa
. In ESXi 5.0, thevpxa.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 isverbose
. Change it to the preferred logging level. For information on the different logging levels, see the Additional Information section.
<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. - Increase the
<maxFileSize>
parameter to change the maximum size of the logs. - Increase the
<maxFileNum>
parameter to change the maximum number of logs. - 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, vpxa log output is set by default to output to syslog. In that case, the advanced settings Syslog.loggers.vpxa.rotateand Syslog.loggers.vpxa.size take precedence over the settings on the vpxa.cfg file.
To change those settings:For ESXi 5.x, you can increase
- Connect to the ESXi host in question with the vSphere Client.
- Select the Configuration tab and click on Advanced Settings in the Software section.
- Expand Syslog then expand loggers, and then select vpxa.
- Locate Syslog.loggers.vpxa.rotate and Syslog.loggers.vpxa.size.
- 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 KiBeach. When making changes here do not need to restart vpxa because values are dynamically set on the host.
vpxa
logging from the vSphere Client:- Using the vSphere Client, connect to the vCenter Server.
- Click the ESXi 5.x host, then click Configuration.
- Under Software, click Advanced Settings.
- In Advanced Settings, click Vpx > Vpxa > config > log.
- Update the Vpx.Vpxa.config.log.level setting with the preferred logging level. For information on the different logging levels, see theAdditional Information section.
vpxd
To increase logging forvpxd
on the vCenter Server, see Enabling trivia logging in vCenter Server 4.0.x/4.1.x/5.0.x/5.1.x (1001584).If the vCenter Server does not start, you must enable trivia logging manually.
To manually enable trivia logging:
- Log into the vCenter Server as an administrator.
- Open the configuration file for
vpxd
in a text editor.
Note: The configuration file forvpxd
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, 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 isinfo
. 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
- Increase the
<maxFileSize>
parameter to change the maximum size of the logs. - Increase the
<maxFileNum>
parameter to change the maximum number of logs. - Restart the VMware VirtualCenter Server service for the change to take effect. For more information, see Stopping, starting, or restarting vCenter services (1003895).
- After editing the
vpxd.cfg
file, the characters<!--
and-->
must to be removed for the changes inside<log>
to take effect. - You can also use the
set
command on the Windows command line to view a list of operating systems. For more information, seeCommon vCenter Server and vSphere Client Windows paths (1028185).
To change the logging level using the vSphere Client:
- Connect the vSphere Client to the vCenter Server.
- Click Administration > vCenter Server Settings > Logging options.
- Select the preferable logging option from the dropdown. For information on the different logging levels, see the Additional Informationsection.
vpxd.cfg
file. To make permanent log level modifications, you must edit the vpxd.cfg
file.Source:-
http://kb.vmware.com/selfservice/microsites/search.do?cmd=displayKC&externalId=1004795
No comments:
Post a Comment