Locating virtual machine log files on an ESXi host
search cancel

Locating virtual machine log files on an ESXi host

book

Article ID: 316550

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

This article provides information on locating virtual machine log files on an ESXi host.

Environment

VMware vSphere ESXi

Resolution

By default, ESXi hosts store virtual machine specific logging in the same directory as the virtual machine's configuration files. The default log file name is vmware.log.

For archival purposes, the log is renamed with a sequential number added to the end, and a new vmware.log file is created. Archived log files are named vmware-#.log. The most recent archived version is named vmware-1.log. When the vmware.log file is next archived, the existing vmware-1.log file is renamed vmware-2.log.

Virtual machine logs can be reconfigured to archive at different intervals, with different names, in different volumes, or when the log reaches a specific size. For more information, see Log rotation and logging options for vmware.log.

To identify the location of vmware.log files:

  1. SSH to the ESXi host via root
  2. To list the locations of the configuration files for the virtual machines registered on the host:

    vim-cmd vmsvc/getallvms

  3. Search the results for the name of a virtual machine file.
  4. The vmware.log file is located in virtual machine folder along with the vmx file.
  5. Record the location of the .vmx configuration file for the virtual machin in question.

    For example:

    /vmfs/volumes/xxxxxxxx-xxxxxxx-c1d2-111122223333/vm1/vm1.vmx
     
  6. If the virtual machine is not registered on the host and to search for the configuration file, run this command:

    find /vmfs -name "*.vmx”



To identify the location of vmware.log files of all VMs, run the following command:

find /vmfs -name "vmware.log*"

Additional Information