xen-tools と rpmstrap で CentOS4 環境を作る(失敗)
まだ、失敗したままなのだが、作業記録を残しておく。
Debian etch で、rpmstrap を利用して Xen の CentOS4 環境を作ってみる。
必要なパッケージのインストール
aptitude install rpmstrap xen-tools
xen-tools.conf の設定
以下の設定にしてみた。
/etc/xen-tools/xen-tools.conf:
dir = /var/xen rpmstrap = 1 size = 4Gb # Disk image size. memory = 64Mb # Memory size swap = 128Mb # Swap size fs = ext3 # use the EXT3 filesystem for the disk image. dist = centos4 # Default distribution to install. image = sparse # Specify sparse vs. full disk images. gateway = 192.168.100.1 netmask = 255.255.255.0 kernel = /boot/vmlinuz-2.6.18-6-xen-686 initrd = /boot/initrd.img-2.6.18-6-xen-686 arch=i386
rpmstrap の設定変更
設定スクリプトが CentOS 4.3 用だったので、mirror.centos.org に置いてある最新のパッケージ名に合わせた。
/usr/lib/rpmstrap/scripts/centos4:
--- centos4.orig 2006-04-04 01:38:20.000000000 +0900 +++ centos4 2008-05-30 17:33:39.000000000 +0900 @@ -35,7 +35,7 @@ case $ARCH in i[3456]86) big_mirror_list=$(cat <<EOF -http://mirror.centos.org/centos/4/os/i386/CentOS/RPMS/ +http://ftp.iij.ad.jp/pub/linux/centos/4/os/i386/CentOS/RPMS/ http://centos.cs.ucr.edu/centos/centos/4.1/os/i386/CentOS/RPMS/ http://ibiblio.org/pub/linux/distributions/caoslinux/centos/4/os/i386/CentOS/RPMS/ http://centos.absinet.net/centos/4.1/os/i386/CentOS/RPMS/ @@ -66,103 +66,102 @@ 0:setup-2.5.37-1.3.noarch.rpm 1:filesystem-2.3.0-1.i386.rpm 2:basesystem-8.0-4.noarch.rpm -3:tzdata-2006a-1.EL4.noarch.rpm -4:glibc-common-2.3.4-2.19.i386.rpm -5:libgcc-3.4.5-2.i386.rpm -6:glibc-2.3.4-2.19.i686.rpm +3:tzdata-2007f-1.el4.noarch.rpm +4:glibc-common-2.3.4-2.39.i386.rpm +5:libgcc-3.4.6-9.i386.rpm +6:glibc-2.3.4-2.39.i686.rpm 7:mktemp-1.5-20.i386.rpm 8:termcap-5.4-3.noarch.rpm 9:libtermcap-2.0.8-39.i386.rpm -10:bash-3.0-19.2.i386.rpm -11:ncurses-5.4-13.i386.rpm +10:bash-3.0-19.6.i386.rpm +11:ncurses-5.4-15.el4.i386.rpm 12:zlib-1.2.1.2-1.2.i386.rpm -13:info-4.7-5.i386.rpm -14:libselinux-1.19.1-7.i386.rpm -15:findutils-4.1.20-7.i386.rpm -15:pcre-4.5-3.2.RHEL4.i386.rpm -16:grep-2.5.1-31.i386.rpm -16:words-3.0-3.noarch.rpm -17:libattr-2.4.16-3.i386.rpm -18:libacl-2.2.23-5.i386.rpm -19:cracklib-dicts-2.7-29.i386.rpm -19:cracklib-2.7-29.i386.rpm -20:libstdc++-3.4.5-2.i386.rpm -21:db4-4.2.52-7.1.i386.rpm +13:info-4.7-5.el4.2.i386.rpm +14:libselinux-1.19.1-7.4.i386.rpm +15:findutils-4.1.20-7.el4.3.i386.rpm +15:pcre-4.5-4.el4_5.1.i386.rpm +16:grep-2.5.1-32.3.i386.rpm +16:words-3.0-3.2.noarch.rpm +17:libattr-2.4.16-3.1.el4.i386.rpm +18:libacl-2.2.23-5.3.el4.i386.rpm +19:cracklib-dicts-2.8.9-1.3.i386.rpm +19:cracklib-2.8.9-1.3.i386.rpm +20:libstdc++-3.4.6-9.i386.rpm +21:db4-4.2.52-7.3.el4.i386.rpm 22:glib-1.2.10-15.i386.rpm 23:glib2-2.4.7-1.i386.rpm -24:sed-4.1.2-4.i386.rpm +24:sed-4.1.2-6.el4.i386.rpm 25:gawk-3.1.3-10.1.i386.rpm -26:centos-release-4-3.2.i386.rpm -27:psmisc-21.4-4.i386.rpm -28:iproute-2.6.9-3.i386.rpm -29:iputils-20020927-18.EL4.2.i386.rpm -30:chkconfig-1.3.13.3-2.i386.rpm -31:e2fsprogs-1.35-12.3.EL4.i386.rpm -32:ethtool-1.8-4.i386.rpm +26:centos-release-4-4.4.i386.rpm +27:psmisc-21.4-4.1.i386.rpm +28:iproute-2.6.9-3.EL4.7.i386.rpm +29:iputils-20020927-19.EL4.5.i386.rpm +30:chkconfig-1.3.13.5.EL4-1.i386.rpm +31:e2fsprogs-1.35-12.11.el4.i386.rpm +32:ethtool-6-1.i386.rpm 33:mingetty-1.07-3.i386.rpm -34:net-tools-1.60-37.EL4.6.i386.rpm -35:popt-1.9.1-13_nonptl.i386.rpm +34:net-tools-1.60-37.EL4.9.i386.rpm +35:popt-1.9.1-23_nonptl.i386.rpm 35:readline-4.3-13.i386.rpm -36:audit-libs-1.0.12-1.EL4.i386.rpm -36:audit-1.0.12-1.EL4.i386.rpm -36:mkinitrd-4.2.1.6-1.i386.rpm -36:kernel-2.6.9-34.EL.i686.rpm -36:hotplug-2004_04_01-7.6.i386.rpm +36:audit-libs-1.0.15-3.EL4.i386.rpm +36:audit-1.0.15-3.EL4.i386.rpm +36:mkinitrd-4.2.1.13-1.i386.rpm +36:kernel-2.6.9-67.EL.i686.rpm +36:hotplug-2004_04_01-7.8.i386.rpm 36:libsepol-1.1.1-2.i386.rpm -36:device-mapper-1.02.02-3.0.RHEL4.i386.rpm -36:hwdata-0.146.18.EL-1.noarch.rpm -36:tar-1.14-9.RHEL4.i386.rpm -36:cpio-2.5-8.RHEL4.i386.rpm -36:gzip-1.3.3-15.rhel4.i386.rpm -36:usbutils-0.11-6.1.i386.rpm -36:lvm2-2.02.01-1.3.RHEL4.i386.rpm -36:less-382-4.i386.rpm +36:device-mapper-1.02.21-1.el4.i386.rpm +36:hwdata-0.146.33.EL-1.noarch.rpm +36:tar-1.14-12.5.1.RHEL4.i386.rpm +36:cpio-2.5-13.RHEL4.i386.rpm +36:gzip-1.3.3-17.rhel4.i386.rpm +36:usbutils-0.11-7.RHEL4.1.i386.rpm +36:lvm2-2.02.27-2.el4.i386.rpm +36:less-382-4.rhel4.i386.rpm 36:MAKEDEV-3.15.2-3.i386.rpm -36:pam-0.77-66.14.i386.rpm -36:initscripts-7.93.24.EL-1.1.centos4.i386.rpm -36:coreutils-5.2.1-31.2.i386.rpm -36:SysVinit-2.85-34.3.i386.rpm -36:shadow-utils-4.0.3-60.RHEL4.i386.rpm -36:udev-039-10.12.EL4.i386.rpm -36:util-linux-2.12a-16.EL4.16.i386.rpm +36:pam-0.77-66.23.i386.rpm +36:initscripts-7.93.31.EL-2.centos4.i386.rpm +36:coreutils-5.2.1-31.7.i386.rpm +36:SysVinit-2.85-34.4.i386.rpm +36:shadow-utils-4.0.3-63.RHEL4.i386.rpm +36:udev-039-10.19.el4.i386.rpm +36:util-linux-2.12a-16.EL4.29.i386.rpm 36:sysklogd-1.4.1-26_EL.i386.rpm 36:which-2.16-4.i386.rpm -36:module-init-tools-3.1-0.pre5.3.2.i386.rpm -36:procps-3.2.3-8.3.i386.rpm +36:module-init-tools-3.1-0.pre5.3.4.i386.rpm +36:procps-3.2.3-8.9.i386.rpm 37:beecrypt-3.1.0-6.i386.rpm 38:bzip2-libs-1.0.2-13.EL4.3.i386.rpm 39:bzip2-1.0.2-13.EL4.3.i386.rpm -40:elfutils-libelf-0.97-5.i386.rpm -40:binutils-2.15.92.0.2-18.i386.rpm -41:elfutils-0.97-5.i386.rpm +40:elfutils-libelf-0.97.1-5.i386.rpm +40:binutils-2.15.92.0.2-24.i386.rpm +41:elfutils-0.97.1-5.i386.rpm 42:gdbm-1.8.0-24.i386.rpm 43:gmp-4.1.4-3.i386.rpm -44:krb5-libs-1.3.4-27.i386.rpm -45:openssl-0.9.7a-43.8.i686.rpm -46:libxml2-2.6.16-6.i386.rpm -47:python-2.3.4-14.1.i386.rpm -48:libxml2-python-2.6.16-6.i386.rpm -48:file-4.10-2.EL4.3.i386.rpm -48:perl-5.8.5-24.RHEL4.i386.rpm +44:krb5-libs-1.3.4-54.i386.rpm +45:openssl-0.9.7a-43.17.el4_6.1.i686.rpm +46:libxml2-2.6.16-10.i386.rpm +47:python-2.3.4-14.4.i386.rpm +48:libxml2-python-2.6.16-10.i386.rpm +48:file-4.10-3.0.2.el4.i386.rpm +48:perl-5.8.5-36.el4_5.2.i386.rpm 48:perl-Filter-1.30-6.i386.rpm 48:patch-2.5.4-20.i386.rpm -49:rpmdb-CentOS-4.3-0.20060314.i386.rpm -49:rpm-build-4.3.3-13_nonptl.i386.rpm -49:rpm-libs-4.3.3-13_nonptl.i386.rpm -49:rpm-4.3.3-13_nonptl.i386.rpm -50:rpm-python-4.3.3-13_nonptl.i386.rpm +49:rpmdb-CentOS-4.6-0.20071119.i386.rpm +49:rpm-build-4.3.3-23_nonptl.i386.rpm +49:rpm-libs-4.3.3-23_nonptl.i386.rpm +49:rpm-4.3.3-23_nonptl.i386.rpm +50:rpm-python-4.3.3-23_nonptl.i386.rpm 51:wget-1.10.2-0.40E.i386.rpm -52:centos-yumconf-4-4.5.noarch.rpm -52:python-elementtree-1.2.6-4.i386.rpm -52:python-sqlite-1.1.6-1.i386.rpm -52:python-urlgrabber-2.9.6-2.noarch.rpm +52:python-elementtree-1.2.6-5.el4.centos.i386.rpm +52:python-sqlite-1.1.7-1.2.1.i386.rpm +52:python-urlgrabber-2.9.8-2.noarch.rpm 52:expat-1.95.7-4.i386.rpm -52:sqlite-3.2.2-1.i386.rpm -52:yum-2.4.2-2.centos4.noarch.rpm +52:sqlite-3.3.6-2.i386.rpm +52:yum-2.4.3-4.el4.centos.noarch.rpm 53:nano-1.2.4-1.i386.rpm -54:openldap-2.2.13-4.i386.rpm -54:cyrus-sasl-2.1.19-5.EL4.i386.rpm -54:cyrus-sasl-md5-2.1.19-5.EL4.i386.rpm +54:openldap-2.2.13-8.i386.rpm +54:cyrus-sasl-2.1.19-14.i386.rpm +54:cyrus-sasl-md5-2.1.19-14.i386.rpm 55:libuser-0.52.5-1.el4.1.i386.rpm 56:passwd-0.68-10.1.i386.rpm EOF
xen-tools のコマンド実行
xen-create-image --verbose --hostname centos4 --ip 192.168.100.30
失敗
見事に失敗。そう簡単には行かないようだ。
ログには以下のようなものが残っていた。
/var/log/xen-tools/centos4.log:
rpmstrap: debug: Installing setup-2.5.37-1.3.noarch.rpm to /tmp/My3u1MtvDC... rpmdb: unable to initialize mutex: Function not implemented rpmdb: /tmp/My3u1MtvDC/tmp/My3u1MtvDC/var/lib/rpm/__db.001: unable to initialize environment lock: Function not implemented error: db4 error(38) from dbenv->open: Function not implemented rpm: To install rpm packages on Debian systems, use alien. See README.Debian.
rpm 関連に問題あるのかな??