25 5月 2010 @ 9:01 PM 

xenでDomUを構築した際、コンソール接続したいと思うだろう。
通常、Linuxではttyが標準のキャラクタデバイスになっているが、xenでは専用の仮想コンソールデバイスがある。

それはxvcであったり、hvcだったりする。

What’s the correct console device name for my Xen PV guest

  • Xenlinux (“xenified”) kernels use “xvc0″ as the console device.
  • Upstream kernel.org pv_ops kernels use “hvc0″ as the console device

Examples of Xenlinux kernels using “xvc0″ console:

  • xen.org linux-2.6.18-xen
  • RHEL5 / CentOS5 kernel-xen 2.6.18
  • Debian Etch 2.6.18-6-xen
  • Debian Lenny 2.6.26-2-xen
  • Ubuntu 8.04 LTS “hardy heron” 2.6.24 xen kernel
  • Novell SLES 10 and SLES 11 xen kernels
  • OpenSUSE xen kernels
  • Various “xenified” forward-ports of the Novell/OpenSUSE Xen patches (2.6.29, 2.6.30, 2.6.31)

Examples of pv_ops domU kernels using “hvc0″ console:

  • All upstream/mainline kernel.org Linux kernels since 2.6.26.
  • Fedora 10, Fedora 11, Fedora 12 kernels
  • Ubuntu 8.10 2.6.27 server-kernel
  • Ubuntu 9.04 2.6.28 linux-image-server
  • Ubuntu 9.10 2.6.31 ec2-kernel

で、xenではDomUとコンソール接続する際、標準ではそのキャラクタデバイスに接続するようになっている。

キャラクタデバイスを変えたい場合は、ブートオプションでxenconsで指定する。
実際はDomUの設定ファイルの、extraを用いて以下のようにすることが多いだろう。

extra='xencons=tty'

みたいな感じで。
でも特に理由がないなら標準の方を使った方がいいんだと思う。たぶん。

でまあ、DomUのセットアップの仕方によっては、DomUにxvc0あるいはhvc0が作られなかったりすることがある。
そういう場合は、作ってやればいい。

# mknod /dev/hvc0 c 229 0

みたいな感じで。

sshでもコンソールでもログインできないときはDomUのファイルシステムをマウントして、マウント先のdevに作ってやる。

で、/etc/inittabに以下を記述

1:2345:respawn:/sbin/getty 38400 hvc0

/etc/securettyに以下を記述

hvc0

ちなみにxvcはxen virtual console, hvcはhypervisor virtual consoleの略らしい。


Posted By: ゆ。
Last Edit: 25 5月 2010 @ 09:01 PM

EmailPermalink
Tags
Tags: ,
Categories: Linux, PC


 

Responses to this post » (None)

 
Post a Comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>


 Last 50 Posts
 Back
Change Theme...
  • Users » 100
  • Posts/Pages » 314
  • Comments » 177
Change Theme...
  • VoidVoid « Default
  • LifeLife
  • EarthEarth
  • WindWind
  • WaterWater
  • FireFire
  • LightLight