How to Enable ESX Server Logs for Troubleshooting

Examining logs is an important way for debugging and troubleshooting a system. There are about ten log files in the ESX server for the hostd agent, which listens API calls, with the same naming pattern as hostd-?.log under the /var/log/vmware directory. The hostd-index file has the number of currently used log files.

The log entry has a similar format to that of VC server logs. Following is a quick sample:

Bothered by SLOW Web UI to manage vSphere? Want to manage ALL your VMware vCenters, AWS, Azure, Openstack, container behind a SINGLE pane of glass? Want to search, analyze, report, visualize VMs, hosts, networks, datastores, events as easily as Google the Web? Find out more about vSearch 3.0: the search engine for all your private and public clouds.

[2008-06-21 07:24:40.769 ‘SOAP’ 64834480 trivia] Received soap request from []: checkForUpdates

The log level can be configured in the /etc/vmware/vpxa.cfg file. Just look for a section like the following. The possible levels are the same as those of VC logs: none, error, warning,info, verbose, or trivia, in an order from less to more detailed messages.

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

After saving the configuration, you need to restart the hostd with the following command line:

service mgmt-vmware restart 

IMPORTANT NOTE:

It’s critical to synchronize the time of all the components involved, especially when you care about the sequences of actions and messages. You can configure NTP on ESX.

This entry was posted in Virtualization, vSphere API and tagged , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

6 Comments

  1. Posted May 12, 2010 at 2:54 am | Permalink

    Great tip.
    Reminded me I have something similar for vCenter logging.
    http://www.lucd.info/2010/05/12/debugging-function-verbose-vpxd-logging/

  2. michael
    Posted May 12, 2010 at 9:45 am | Permalink

    Are you talking about hostd logs or about vpxa logs?
    For hostd log settings you should edit /etc/vmware/hostd/config.xml file
    and for vpxa logs the file is /etc/opt/vmware/vpxa/vpxa.cfg (i don’t have … line there).
    I’m running ESX 4.0 U1.

  3. Posted May 13, 2010 at 2:30 am | Permalink

    Great question! It’s the hostd logs for troubleshooting applications built on of vSphere APIs.
    -Steve

  4. Posted May 13, 2010 at 2:31 am | Permalink

    Thanks for sharing Luc!

    -Steve

  5. Posted December 15, 2010 at 6:16 am | Permalink

    “Just look for a section like the following. The possible levels are the same as those of VC logs: none, error, warning,info, verbose, or trivia, in an order from less to more detailed messages.”
    You can read more about it?

  6. Posted April 30, 2014 at 1:38 pm | Permalink

    I love reading through a post that will make people think.
    Also, thank you for permitting me to comment!

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

  • NEED HELP?


    My company has created products like vSearch ("Super vCenter"), vijavaNG APIs, EAM APIs, ICE tool. We also help clients with virtualization and cloud computing on customized development, training. Should you, or someone you know, need these products and services, please feel free to contact me: steve __AT__ doublecloud.org.

    Me: Steve Jin, VMware vExpert who authored the VMware VI and vSphere SDK by Prentice Hall, and created the de factor open source vSphere Java API while working at VMware engineering. Companies like Cisco, EMC, NetApp, HP, Dell, VMware, are among the users of the API and other tools I developed for their products, internal IT orchestration, and test automation.