まず、fedora12
/boot/grub/grub.conf
default=0
timeout=10
#splashimage=(hd0,0)/boot/grub/splash.xpm.gz
serial --unit=0 --speed=115200
terminal --timeout=10 serial console
#hiddenmenu
default saved
title Fedora (2.6.32.16-141.fc12.x86_64)
root (hd0,0)
kernel /boot/vmlinuz-2.6.32.16-141.fc12.x86_64 ro root=UUID=c70ceb36-eeea-48ee-9cd9-71d5a983ab40 LANG=ja_JP.UTF-8 KEYBOARDTYPE=pc KEYTABLE=jp106 norhgb noquiet console=tty0 console=ttyS0,115200
initrd /boot/initramfs-2.6.32.16-141.fc12.x86_64.img
と、grub.confにシリアルの設定書くだけ。ヘタにパリティとかストップビットとか記述すると動かんっぽいので何も書かないのが吉。
普段つかっているUSBシリアルの設定をカット&ペーストしてはまった。
つぎ、Ubuntu 10.04
/etc/default/grub
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
GRUB_DEFAULT=saved
GRUB_SAVEDEFAULT=true
#GRUB_HIDDEN_TIMEOUT=10
#GRUB_HIDDEN_TIMEOUT_QUIET=false
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="noquiet nosplash console=tty0 console=ttyS0,115200"
GRUB_CMDLINE_LINUX=""
# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console
GRUB_TERMINAL=serial
GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0"
# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480
# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true
# Uncomment to disable generation of recovery mode menu entries
GRUB_DISABLE_LINUX_RECOVERY="true"
# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
# ttyS0 - getty
#
# This service maintains a getty on ttyS0 from the point the system is
# started until it is shut down again.
start on stopped rc RUNLEVEL=[2345]
stop on runlevel [!2345]
respawn
exec /sbin/getty -L 115200 ttyS0 vt102
あとはホストで、
# virsh start
と、--consoleオプションつけて、ゲストを起動するだけ
コメント