35.11. Troubleshooting with serial consoles


Linux kernels can output information to serial ports. This is useful for debugging kernel panics and hardware issues with video devices or headless servers. The subsections in this section cover setting up serial console output for machines running Red Hat Enterprise Linux virtualization kernels and their guests.

35.11.1. Serial console output for Xen

By default, the serial console for the Xen hypervisor is disabled and no data is output from serial ports.
To receive kernel information on a serial port modify the /boot/grub/grub.conf file by setting the appropriate serial device parameters.
If your serial console is on com1, modify /boot/grub/grub.conf by inserting the lines com1=115200,8n1, console=tty0 and console=ttyS0,115200 where shown.
title Red Hat Enterprise Linux 5 i386 Xen (2.6.18-92.el5xen)
	root (hd0, 8)
	kernel /boot/xen.gz-2.6.18-92.el5 com1=115200,8n1
	module /boot/vmlinuz-2.6.18-92.el5xen ro root=LABEL=VG_i386 console=tty0
				console=ttyS0,115200
	module /boot/initrd-2.6.18-92.el5xen.img
Copy to Clipboard Toggle word wrap
If your serial console is on com2, modify /boot/grub/grub.conf by inserting the lines com2=115200,8n1 console=com2L, console=tty0 and console=ttyS0,115200 where shown.
title Red Hat Enterprise Linux 5 i386 Xen (2.6.18-92.el5xen)
	root (hd0, 8)
	kernel /boot/xen.gz-2.6.18-92.el5 com2=115200,8n1 console=com2L
	module /boot/vmlinuz-2.6.18-92.el5xen ro root=LABEL=VG_i386 console=tty0
	console=ttyS0,115200
	module /boot/initrd-2.6.18-92.el5xen.img
Copy to Clipboard Toggle word wrap
Save the changes and reboot the host. The hypervisor outputs serial data on the serial (com1, com2 and so on) you selected in the previous step.
Note the example using the com2 port, the parameter console=ttyS0 on the vmlinuz line us used. The behavior of every port being used as console=ttyS0 is not standard Linux behavior and is specific to the Xen environment.

35.11.2. Xen serial console output from para-virtualized guests

This section describes how to configure a virtualized serial console for Red Hat Enterprise Linux para-virtualized guests.
Serial console output from para-virtualized guests can be received using the "virsh console" or in the "Serial Console" window of virt-manager. Set up the virtual serial console using this procedure:
  1. Log in to your para-virtualized guest.
  2. Edit /boot/grub/grub.conf as follows:
    Red Hat Enterprise Linux 5 i386 Xen (2.6.18-92.el5xen)
    	root (hd0, 0) kernel /boot/vmlinuz-2.6.18-92.el5xen ro root=LABEL=VG_i386 console=xvc0 
    	initrd /boot/initrd-2.6.18-92.el5xen.img
    
    Copy to Clipboard Toggle word wrap
  3. Reboot the para-virtualized guest.
You should now get kernel messages on the virt-manager "Serial Console" and "virsh console".
Logging the para-virtualized domain serial console output

The Xen daemon(xend) can be configured to log the output from serial consoles of para-virtualized guests.

To configure xend edit /etc/sysconfig/xend. Change the entry:
# Log all guest console output (cf xm console)
#XENCONSOLED_LOG_GUESTS=no
Copy to Clipboard Toggle word wrap
to:
# Log all guest console output (cf xm console)
XENCONSOLED_LOG_GUESTS=yes
Copy to Clipboard Toggle word wrap
Reboot the host to activate logging the guest serial console output.
Logs from the guest serial consoles are stored in the /var/log/xen/console file.

35.11.3. Serial console output from fully virtualized guests

This section covers how to enable serial console output for fully virtualized guests.
Fully virtualized guest serial console output can be viewed with the "virsh console" command.
Be aware fully virtualized guest serial consoles have some limitations. Present limitations include:
  • logging output with xend is unavailable.
  • output data may be dropped or scrambled.
The serial port is called ttyS0 on Linux or COM1 on Windows.
You must configure the virtualized operating system to output information to the virtual serial port.
To output kernel information from a fully virtualized Linux guest into the domain modify the /boot/grub/grub.conf file by inserting the line "console=tty0 console=ttys0,115200".
title Red Hat Enterprise Linux Server (2.6.18-92.el5)
	root (hd0,0)
	kernel /vmlinuz-2.6.18-92.el5 ro root=/dev/volgroup00/logvol00
	console=tty0 console=ttys0,115200
	initrd /initrd-2.6.18-92.el5.img
Copy to Clipboard Toggle word wrap
Reboot the guest.
View the serial console messages using the "virsh console" command.

Important

Serial console messages from fully virtualized domains are not logged in /var/log/xen/console as they are for para-virtualized guests.
맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2025 Red Hat