Enabling serial-line logging for ESXi
search cancel

Enabling serial-line logging for ESXi

book

Article ID: 311033

calendar_today

Updated On:

Products

VMware vSphere ESXi VMware vSphere ESXi 7.0 VMware vSphere ESXi 8.0

Issue/Introduction

This article provides steps to enable serial-line logging for an ESXi.

It is sometimes helpful to have logs captured independent of disk or network connectivity when troubleshooting issues. Enabling serial logging sends all VMkernel logs to the serial port in addition to their normal destination. For more information on network-based logs, see Configuring syslog on ESXi. For more information on disk-based logs, see Collecting diagnostic information for VMware ESX/ESXi.

This article assumes that the ESXi host's serial port is connected to a remote computer, and that remote computer is listening for logs on the serial port. For more general information, see the parent article in this series Enabling serial-line logging for an ESX or ESXi host (1003900).

 

Resolution

ESXi can be configured to send logs to the serial port at three points in time:

  • After installation and startup
  • During startup
  • During installation

Collect logs leading up to the time that the problem occurs.

After installation and startup

A running ESXi host can be configured to output log messages via the serial communications port. If the ESXi host does not successfully boot, consider configuring it during startup instead.

Change four configuration options using one of the methods in Configuring advanced options for ESX/ESXi (1038578):

  • Set the Misc.LogToSerial option to 1.
  • Set the Misc.DebugLogToSerial option to 1.
  • Set either the VMKernel.boot.com1_baud or VMKernel.boot.com2_baud options to 115200.
  • Set the Misc.LogPort option to COM1 or COM2. Changing the Misc.LogPort option to none disables use of a serial port for logging.

    Note: Changing the Misc.LogPort option between COM1 and COM2 requires first stopping use of the serial port by changing to none.
     

During startup

If an ESXi host does not successfully boot, serial line logging can be configured using advanced kernel boot-time parameters. This takes effect for the current boot, and does not persist across future reboots.

To enable serial-line logging during startup:

  1. At the Loading VMware ESXi screen, press Shift+O on your keyboard.
  2. At the prompt, add the advanced option to specify a serial port at the start of the line:

    > vmkBootVerbose=TRUE vmbLog=TRUE logPort=com1

    The above command is preferred, alternatively the following can be used:

    > debugLogToSerial=1 logPort=com1 no-auto-partition bootUUID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
     
  3. Press Enter to boot.
  4. Logging starts after the first loading progress bar finishes.

Note: Serial line logging continues until the configuration options are loaded, at which point the saved configuration takes effect. To continue serial line logging after booting, make the configuration change after installation and startup.

During installation

If an ESXi host does not successfully install, serial line logging can be configured when booting the installer using advanced kernel boot-time parameters. This takes effect for the current boot, and does not persist across future reboots.

To enable serial-line logging during installation:

  1. At the Loading ESXi installer screen, press Shift+O on your keyboard.
  2. At the prompt, append the advanced option to specify a serial port after runweasel:

    > runweasel debugLogToSerial=1 logPort=com1
     
  3. Press Enter to boot.
  4. Logging starts after the first loading progress bar finishes.

Note: Configuration changes applied when starting the installer do not persist to the installed ESX configuration. To continue serial-line logging after booting, make the configuration change after installation and startup.

 

Additional Information