Weblog entry #52 for dkg
Trouble is, the way that xen works with the serial console has changed between etch and lenny. So what's changed? From what i can tell:
- The way that the dom0 Linux kernel interacts with the hypervisor's console has changed between Linux 2.6.18 (etch) and 2.6.26 (lenny), and
- the Xen hypervisor's method of specifying the console itself has changed between Xen 3.0.3 (etch) and 3.2.1 (lenny)
title Xen 3.0.3-1-i386-pae / Debian GNU/Linux, kernel 2.6.18-4-xen-686 root (hd0,0) kernel /xen-3.0.3-1-i386-pae.gz dom0_mem=131072 com1=115200,8n1 module /vmlinuz-2.6.18-4-xen-686 root=/dev/mapper/vg_monkey0-dom0 ro console=ttyS0,115200n8 module /initrd.img-2.6.18-4-xen-686 savedefaultbut in lenny, i find it necessary to do this:
title Xen 3.2-1-i386 / Debian GNU/Linux, kernel 2.6.26-2-xen-686 root (hd0,0) kernel /xen-3.2-1-i386.gz dom0_mem=131072 com1=115200,8n1 console=com1 module /vmlinuz-2.6.26-2-xen-686 root=/dev/mapper/vg_monkey0-dom0 ro console=hvc0 module /initrd.img-2.6.26-2-xen-686In particular, the hypervisor itself needs an additional console=com1 argument to make sure that it uses the serial console (i suppose the com1=... argument simply specifies how to use the serial console should you need it, instead of a requirement to use the console).
And the Linux kernel itself for the dom0 needs to adopt hvc0 as its console, which i believe is an acronym for something like the "hypervisor virtual console" -- this way, the dom0 kernel will come out multiplexed over the hypervisor's console, no matter where that hypervisor's console is directed (you might not even need to specify this explicitly -- it might be set up by default).
When i tried to use the etch settings for the console with the lenny hypervisor and kernel, i saw the hypervisor try to come out on the video card, and a dom0 crash!
Comments on this Entry
I think you will also need to add: extra = "console=hvc0" To the xen virtual hosts' configuration file(s).
And - in the xen virtual host, you need to edit /etc/inittab: -1:2345:respawn:/sbin/getty 38400 tty1 jamie
+1:2345:respawn:/sbin/getty 38400 hvc0
[ Parent | Reply to this comment ]
[ Send Message | View dkg's Scratchpad | View Weblogs ]
when you say "xen virtual host", do you mean the dom0 or a domU?
and when you say "configuration file(s)", do you mean /etc/xen/xyzzy for the domU named xyzzy or some other configuration file?
[ Parent | Reply to this comment ]
Gah - not very clear the first time.
Here's a take two:
I think you'll need to add: extra = "console=hvc0"
To each domU's configuration file (in /etc/xen/host-name on the dom0).
And - in the domUs' file systems, you need to edit /etc/inittab: -1:2345:respawn:/sbin/getty 38400 tty1 jamie
+1:2345:respawn:/sbin/getty 38400 hvc0
[ Parent | Reply to this comment ]
http://www.cs.mcgill.ca/~james/code/
[ Parent | Reply to this comment ]