Enabling serial-line logging for ESXi 5.x and later
search cancel

Enabling serial-line logging for ESXi 5.x and later

book

Article ID: 311033

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

This article provides steps to enable serial-line logging for an ESXi 5.x and later.

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).


Symptoms:



Environment

VMware vSphere ESXi 5.5
VMware vSphere ESXi 5.1
VMware vSphere ESXi 6.0
VMware vSphere ESXi 7.0.0
VMware vSphere ESXi 6.5
VMware vSphere ESXi 5.0
VMware vSphere ESXi 6.7

Resolution

ESXi 5.x and 6.0 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 5.x and 6.0 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 5.x and 6.0 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


Enabling serial-line logging for an ESXi/ESXi host
Enabling syslog on ESXi 3.5 and 4.x
Using Tech Support Mode in ESXi 4.1, ESXi 5.x, and ESXi 6.x
Location of ESX 3.0-4.1 log files
Configuring a vSphere ESXi host to use a local USB device for VMkernel coredumps
Configuring advanced options for ESXi/ESX
Configuring syslog on ESXi
Location of ESXi 5.0 log files
Location of ESXi 5.1 and 5.5 log files