Wednesday, October 29, 2008

I can't access the PV guest serial console via "xm console" or "virsh console" in RHEL5 xen. How can I fix it?

This would work out of the box in most cases, but in certain scenarios it may not work as expected. If someone hits such a situation, please make sure below things are done correctly.

1 - Edit /boot/grub/grub.conf of the guest and add "console=tty0 console=xvc0" to the kernel line, if you wanted the boot messages to appear on the serial console.

Eg, RHEL4 PV guest grub.conf would look like as below.

title Red Hat Enterprise Linux ES (2.6.9-78.ELxenU)
root (hd0,0)
kernel /boot/vmlinuz-2.6.9-78.ELxenU ro root=LABEL=/ console=tty0 console=xvc0
initrd /boot/initrd-2.6.9-78.ELxenU.img

2 - Add the below line to /etc/inittab under "Run gettys in standard run levels" if a login prompt is needed on serial console after system is booted.

co:2345:respawn:/sbin/agetty xvc0 9600 vt100-nav

3 - Add "xvc0" to /etc/securetty if root to log in need to be allowed from this console.

Make sure that the guest is rebooted after checking the abov three points.

1 comment:

bill said...

hi, do help me. thanks from china shanghai.