Wednesday, October 29, 2008

Can't access serial devices in Dom0. How to fix it?

A lot of xen users report that when they access a serial device while running xen kernel, they get "Cannot get serial info: Invalid argument", but while running the generic kernel (non-xen kernel), they have no problem to access the serial device. Eg,

[root@xen ~]# setserial /dev/ttyS0
Cannot get serial info: Invalid argument

To solve this, kernel output need to be redirected to xen console by adding "console=xvc console=tty0 xencons=xvc" to "module /vmlinuz" line in grub.conf as below.

module /vmlinuz-2.6.18-92.1.13.el5xen ro root=/dev/VolGroup00/LogVol00 rhgb quiet console=xvc console=tty0 xencons=xvc

Reboot the host and everything would work fine after that.

[root@xen ~]# setserial /dev/ttyS0
/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 7

No comments: