[CentOS-virt] working config for xen which would transfer a serial interface
Philippe Naudin
philippe.naudin at supagro.inra.fr
Thu Aug 5 10:51:59 EDT 2010
Le Thu, 05 Aug 2010 16:31:21 +0300,
Manuel Wolfshant <wolfy at nobugconsulting.ro> a écrit :
> Hello
>
> Can anyone share a known working config for xen which would
> transfer a serial interface ( add-on card preferably, mine uses
> e880-e887 : 0000:03:05.0 / ec00-ec07 : 0000:03:05.0 ) to a DomU ?
Sorry, only the on-board standard serial port here :
## dom0 : /etc/xen/omega
name = "omega"
kernel = "/boot/vmlinuz-2.6.18-128.1.6.el5xen"
ramdisk = "/boot/initrd-2.6.18-128.1.6.el5xen.img"
memory = 256
vif = [ 'mac=AA:00:AC:10:01:0f, bridge=xenbr1' ]
disk = ['file:/var/lib/xen/images/omega.img,sda1,w' ]
# serial port :
irq = [ 4 ]
ioports = [ "3f8-3ff" ]
#
root = "/dev/sda1 ro"
extra = "fastboot"
## domU : /etc/rc.local # but should be in /etc/udev/somewhere
modprobe -a serial_core 8250
chown root:ups /dev/ttyS0
## domU : ls /lib/modules/2.6.18-128.1.6.el5xen/kernel/drivers/serial/
8250.ko 8250_pci.ko 8250_pnp.ko jsm serial_core.ko serial_cs.ko
## domU : lsmod | egrep '(serial|8250)'
8250 35685 2
serial_core 24641 1 8250
## domU : dmesg | grep -i serial
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled
serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
> [root at Dom0 ~]# dmesg | grep ttyS
Xen virtual console successfully installed as ttyS0
(from /var/log/dmesg, the output of dmesg is full of messages from
iptables)
> [root at Dom0 ~]# cat /etc/modprobe.d/blacklist
> #[...]
blacklist 8250
blacklist 8250_pnp
blacklist serial_core
> [root at Dom0 ~]# grep xen /etc/grub.conf
title CentOS (2.6.18-194.8.1.el5xen)
kernel /boot/xen.gz-2.6.18-194.8.1.el5 dom0_mem=256M vga=mode-0x307 noreboot dom0_vcpus_pin dom0_max_vcpus=1 xencons=tty
module /boot/vmlinuz-2.6.18-194.8.1.el5xen ro root=LABEL=/
module /boot/initrd-2.6.18-194.8.1.el5xen.img
# (not up-to-date because I am lazy...)
> sniff from the boot messages in tge DomU:
XENBUS: Device with no driver: device/vbd/2049
XENBUS: Device with no driver: device/vif/0
# ( nothing more )
> [root at DomU ~]# cat /proc/interrupts
> CPU0
4: 82698953 Phys-irq serial
> [root at DomU ~]# cat /proc/ioports
03f8-03ff : serial
>
> [root at DomU ~]# lsmod
> Module Size Used by
> 8250_pnp 43969 0
> parport_serial 41153 0
> 8250_pci 56257 1 parport_serial
> 8250 86057 2 8250_pnp,8250_pci
> serial_core 56385 1 8250
> [...]
Good (for a standard serial port) but useless without a port.
This domU has been created from an image from http://stacklet.com/.
I had no problem at all.
Good luck,
--
Philippe
More information about the CentOS-virt
mailing list