Bug 432235 - The serial console of the paravitualized guest is fully non funcitonal
The serial console of the paravitualized guest is fully non funcitonal
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: Virtualization_Guide (Show other bugs)
5.3
x86_64 Linux
low Severity high
: rc
: ---
Assigned To: Christopher Curran
Content Services Development
: Documentation
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-02-10 04:27 EST by Audrius Meskauskas
Modified: 2009-08-20 00:02 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-02-23 00:14:19 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Audrius Meskauskas 2008-02-10 04:27:24 EST
Description of problem:
The serial console of the paravirtualized guest (Fedora 8) is non functional. 

Steps to Reproduce:
1. Install Fedora 8, as paravirtualized guest.
2. Try to open serial console from the GUI interface. The console window 
appears, but it does not accept any input and never gives any output.
3. Try to open serial console from the command line. This results the same 
behaviour.

During all this time the graphical console operates normally, showing the 
internals of Fedora.
  
Actual results:
The serial console does not work.

Expected results:
The serial console works AND supports X.

Additional info:
Comment 1 Audrius Meskauskas 2008-02-10 04:43:08 EST
The 
http://www.redhat.com/docs/manuals/enterprise/RHEL-5-manual/Virtualization-en-US/ch-virt-serialconsole-errors.html
describes the workaround for this problems. I did how they recommended but 
this was not helpful: the problem have stayed exactly as it was before 
changes.
Comment 2 Michael Hideo 2008-03-03 20:03:39 EST
Hi Audrius,

Change the line:
kernel /boot/xen.gz-2.6.18-1.2910.el5 com2=115200, 8n1

To:
kernel /boot/xen.gz-2.6.18-1.2910.el5 com2=115200,8n1

And let me know how you go as this may be due to the typo reported in BZ#246427

- Mike
Comment 4 Chris Lalancette 2008-10-23 03:58:42 EDT
ChrisC,
     I've been asked to help document the serial console stuff.  Some of the stuff below pertains to paravirtualized guests, some of it pertains to fully virtualized guests, and some of it pertains to the dom0 itself.  I'll try to be as clear as I can; if I lose you anywhere, please let me know so that I can correct it.

I'll start with the serial console in dom0.  This roughly corresponds to section 19.15 (Serial Console Errors), but it contains a number of errors.  Below is an updated version.

-------------------------------------------------------------------------------
19.15. Serial console output from domain 0

You receive no output to the serial console connected to domain 0. To correct this problem, you must modify the grub.conf to set the hypervisor and kernel to output to the serial console.  If your serial console is on com1, you should setup /boot/grub/grub.conf as follows:

title RHEL5 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=RHEL5_i386 console=tty0 console=ttyS0,115200
module /boot/initrd-2.6.18-92.el5xen.img

If your serial console is on com2, you should setup /boot/grub/grub.conf as follows:

title RHEL5 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=RHEL5_i386 console=tty0 console=ttyS0,115200
module /boot/initrd-2.6.18-92.el5xen.img

Now reboot your domain 0.  These changes to the grub.conf should enable your serial console to work correctly.  Note that in the com2 example, you still use console=ttyS0 on the vmlinuz line, even though your serial console is on com2.  This is unique to the Xen environment.
-------------------------------------------------------------------------------

Next is setting up a "serial" console in a paravirtualized domain.  This is vastly different from the domain-0, so you probably want to have a separate question/section for it:

-------------------------------------------------------------------------------
19.16. Serial console output from a paravirtualized domain

If you want kernel messages from your paravirtualized guest to be seen on "virsh console", or in the "Serial Console" window of virt-manager, you must set up the virtual serial console.  To do this, log into your paravirtualized guest, and edit /boot/grub/grub.conf as follows:

title RHEL5 i386 Xen (2.6.18-92.el5xen)
root (hd0, 0)
kernel /boot/vmlinuz-2.6.18-92.el5xen ro root=LABEL=RHEL5_i386 console=xvc0
initrd /boot/initrd-2.6.18-92.el5xen.img

Then shut down your paravirtualized guest, and start it again.  You should now get kernel messages on the virt-manager "Serial Console" and/or "virsh console".
--------------------------------------------------------------------------------

Note that it is possible to set up "serial console" logging of your guests, although it requires a domain 0 reboot.

------------------------------------------------------------------------------
19.17.  Logging paravirtualized domain serial console output

You can setup xend to log all of the output from the serial console of your paravirtualized domains.  To do this, edit /etc/sysconfig/xend, and change:

# Log all guest console output (cf xm console)
#XENCONSOLED_LOG_GUESTS=no

to:

# Log all guest console output (cf xm console)
XENCONSOLED_LOG_GUESTS=yes

Once you have made this change, you must reboot domain 0 to activate it.  Logs from the guest serial consoles will be available in /var/log/xen/console.
------------------------------------------------------------------------------ 

Finally, it is possible to setup serial console in a fully virtualized domain, although it has some limitations.  In particular, you can't do logging of the fully virtualized serial port, and it is much more likely to drop or garble output data.  Nevertheless, I find it invaluable when I am logging into a remote machine (basically so I don't have to have X running somewhere to see the console).

-------------------------------------------------------------------------------
19.18.  Serial console output from a fully virtualized domain

If you want kernel messages from your fully virtualized domain to be seen on "virsh console", you must setup the emulated virtual serial console.  This will always be ttyS0 in Linux terms, or COM1 in Windows terms; you'll need to setup your fully virtualized operating system appropriately.  For example, for a Linux fully virtualized domain you would log into the domain and edit /boot/grub/grub.conf as follows:

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

Then shutdown your fully virtualized domain, and start it again.  When your domain comes back up, you should be able to see the serial console messages using "virsh console".  Note that serial console messages from fully virtualized domains are *not* logged in /var/log/xen/console as they are for paravirtualized domains.
-------------------------------------------------------------------------------

That should about cover it, I think.  Any questions or corrections, let me know!

Chris Lalancette
Comment 5 Patrick C. F. Ernzer 2008-11-04 07:09:12 EST
Chris,

can you also look over section 29.6 (c.f. Bug 469695) please?

PCFE

Note You need to log in before you can comment on or make changes to this bug.