Configuring your VMware vSphere Management Assistant (vMA) appliance to collect the logs from an ESX/ESXi host:
- 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.
- Run this command to view the list of ESX/ESXi hosts connected to the vMA appliance.
# sudo vifp listservers
- 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