Using vSphere Management Assistant (vMA) to collect ESX and ESXi logs
search cancel

Using vSphere Management Assistant (vMA) to collect ESX and ESXi logs

book

Article ID: 311671

calendar_today

Updated On:

Products

VMware vCenter Server VMware vSphere ESXi

Issue/Introduction

The VMware vSphere Management Assistant (vMA) can be configured to accept logs from your ESX and ESXi host. 

For vMA 5.x, the vilogger command has been removed. The vma-support script has been provided to collect various system configuration information. 

Environment

  • VMware ESX 4.1.x
  • VMware ESX 4.0.x
  • VMware ESXi 4.0.x Embedded
  • VMware ESXi 4.1.x Embedded
  • VMware ESXi 4.1.x Installable
  • VMware ESXi 4.0.x Installable

Resolution

Configuring your VMware vSphere Management Assistant (vMA) appliance to collect the logs from an ESX/ESXi host:
  1. Run this command to add the ESX/ESXi host to the vMA appliance:

    # sudo vifp addserver [ESX/ESXi IP or HOSTNAME]

    You are prompted for the root password for the target system.

  2. Run this command to view the list of ESX/ESXi hosts connected to the vMA appliance.

    # sudo vifp listservers
  3. Run this command to enable the vilogger interface and to configure vMA to collect log files from the target ESX/ESXi or vCenter Server hosts according to the specified log policy:

    # vilogger enable --server [ESX/ESXi IP or HOSTNAME] --numrotation <ROTATION: 1 to 1024> --maxfilesize <SIZE in MB: 1 to 1024> --collectionperiod <PERIOD in seconds: 10 to 3600>

    Where ESX/ESXi IP or HOSTNAME is the IP address or hostname of the ESX/ESXi host.

    For example, the command with default values is:

    # vilogger enable --server [ESX/ESXi IP or HOSTNAME] --numrotation 5 --maxfilesize 5 --collectionperiod 10

In the vMA 4.x versions, the logs are located at /var/log/vmware. In earlier vMA versions, the logs are located at /var/log/syslog.

Each host managed by the vMA appliance has a sub-directory within /var/log/vmware. Each of these sub-directories, in turn, contains the log files, such as hostd.log, messages.log, vmkernel.log, vmkwarning.log, and vpxa.log.

To read the log files, you can use commands such as tail -f. For example, to read the contents of the vpxa.log file, run this command:

# tail -f /var/log/vmware/<FQDN of Host>/vpxa.log

Additional Information

The syntax of the vilogger command is:

vilogger <command>

Where <command> can be one of the following:

  • enable [--server <SERVER>]
    [--logname <LOGNAME>]
    [--collectionperiod <PERIOD in seconds: 10 to 3600>]
    [--numrotation <ROTATION: 1 to 1024>]
    [--maxfilesize <SIZE in MB: 1 to 1024>]

  • disable [--server <SERVER>]
    [--logname <LOGNAME>]
    [--force]

  • list [--server <SERVER>]
    [--logname <LOGNAME>]

  • updatepolicy [--server <SERVER>]
    [--logname <LOGNAME>]
    [--collectionperiod <PERIOD in seconds: 10 to 3600>]
    [--numrotation <ROTATION: 1 to 1024>]
    [--maxfilesize <SIZE in MB: 1 to 1024>]

  • help | --help | -h [<command name>]