で、やっとkickstartで全自動インストールにチャレンジ
(kickstartで検索していらした方への追記:Product Documentation - Red Hat Customer Portalあたりが最近のマニュアルのようです)
始まった...rikenさんのスピードにすべてが、、retryもしないとダメかな、
あ、rikenさんのサーバ名まちがっとった、、orz...
あ、さらにURIで/Linux/centos/5.0/os/i386 とかやってしまった、 /Linux/centos/5/os/i386 がbetter (as of 19:03)
そうそう、先達には感謝しきりです。先人の業績がなければ(つーか、良いドキュメントを探す努力に欠けてるんですけど)ここまで失敗することすらできなかったに違いない。
とりあえず作ったkickstartファイル(前に出てきた、インストール直後の/root/anaconda-ks.cfgと大差ない)
# Kickstart file automatically generated by anaconda. install url --url ftp://ftp.riken.jp//Linux/centos/5/os/i386 lang en_US.UTF-8 network --device eth0 --bootproto static --ip 192.168.**.** --netmask 255.255.255.0 --gateway 192.168.0.1 --nameserver xx.xx.xx.xx --hostname サーバ名 rootpw --iscrypted パスワードハッシュ firewall --enabled --port=sshのポート番号:tcp authconfig --enableshadow --enablemd5 selinux --enforcing timezone --utc Asia/Tokyo bootloader --location=mbr --driveorder=xvda --append="console=xvc0" # The following is the partition information you requested # Note that any partitions you deleted are not expressed # here so unless you clear all partitions first, this is # not guaranteed to work zerombr yes #clearpart --linux --drives=xvda clearpart --all --drives=xvda part /boot --fstype ext3 --size=100 --ondisk=xvda part pv.1000 --size=0 --grow --ondisk=xvda volgroup VolGroup00 --pesize=32768 pv.1000 logvol swap --fstype swap --name=LogVol01 --vgname=VolGroup00 --size=784 --grow --maxsize=1568 logvol / --fstype ext3 --name=LogVol00 --vgname=VolGroup00 --size=1024 --grow reboot %packages @admin-tools @base @core @development-libs @development-tools @editors @ftp-server @graphics @java @java-development @legacy-software-development @legacy-software-support @mail-server @mysql @network-server @ruby @server-cfg @sql-server @system-tools @text-internet @web-server @x-software-development
とりあえずやったこと(イメージファイルは10GB:簡略化済み)
# dd if=/dev/zero of=イメージファイル名 bs=1024k count=10000 # virt-install --name=設定ファイル名 --ram=256 --vcpus=1 --nographics \ --paravirt -f イメージファイル名 \ --location=ftp://ftp.riken.jp/Linux/centos/5/os/i386 \ --extra-args='ks=http://kickstartファイルを置いたWebサーバ/kickstartファイルのパス'
(5/24追記)ここで一つ注意すべきは、kickstartファイルのURLです。よくあるのは、Dom-0のサーバ上にwebサーバを立てて、そこにkickstartを置くケースです。
その際、コマンドラインから
# wget http://localhost/xxx
という風に動作確認をしてしまいがちです(自分は)。そのURLをそのまま使うと、新しくインストールされるDom-Uの「localhost」にアクセスしてしまうため、エラー画面が出ますのでご注意を。