とりあえず
BlueOnyx なるもの環境を作らないかん状況になったので、手元の KVM に入れようと libvirt と格闘中。
virt-install -n blueonyx5208r -r 1024 -f ~/libvirt/images/blueonyx5208r.img -s 50 --vcpus=1 --os-variant=rhel6 --cdrom=/var/tmp/BlueOnyx-5208R-CentOS-6.6-20150323.iso
ERROR Error validating install location: Checking installer location failed: Could not find media '/var/tmp/BlueOnyx-5208R-CentOS-6.6-20150323.iso'
/var/tmp/BlueOnyx-5208R-CentOS-6.6-20150323.iso にはちゃんとファイルもあるし、md5 も大丈夫だし file コマンドで確認しても bootable になってる。
もう考えるのもアレなので、iso を loopback マウントしてごまかすことに。
mount -o loop /var/tmp/BlueOnyx-5208R-CentOS-6.6-20150323.iso /mnt/tmp
んで以下実行。
virt-install -n blueonyx5208r -r 1024 -f /home/ryo/libvirt/images/blueonyx5208r.img -s 50 --vcpus=1 --location /mnt/tmp/
おぉ、BlueOnyx のインストーラが走り始めた。が、CD-ROM イメージ内の ks/ ディレクトリ下の kickstart.cfg を使ってインストールすべきらしい。手動でパラメータ選択するのもアレなので一旦 Ctrl-C で中止。
virsh destroy, virsh undefine してからやりなおし。
virt-install -n blueonyx5208r -r 1024 -f /home/ryo/libvirt/images/blueonyx5208r.img -s 5 --vcpus=1 --extra-args "ks=http://10.9.3.182/blueonyx/ks/kickstart.cfg ksdevice=eth0" --location /mnt/tmp/
上記 10.9.3.182 は自分の IP アドレス(自分のマシンの Apache の DocumentRoot 下に /mnt/tmp(BlueOnyxのCDイメージルート)を blueonyx って名前で symlink してる)が、ks の読み込み時にドライバを要求されてしまう。
ちょっとごまかしで、以下のように--location に指定してるイメージルートを http 経由にしてみた。
virt-install -n blueonyx5208r -r 1024 -f /home/ryo/libvirt/images/blueonyx5208r.img -s 5 --vcpus=1 --extra-args "ks=http://10.9.3.182/blueonyx/ks/kickstart.cfg ksdevice=eth0" --location="http://10.9.3.182/blueonyx"
したら、おぉ、今度はちゃんと行けたらしい。
インストールもひと通り終わって、root/blueonyxでログインしたら今度は IP アドレスを求められる。DHCP クライアントはダメっぽい。
今回は一般ユーザからの virt-install で interface type='user' な環境なので、デフォルトのネットワークは以下。
https://libvirt.org/formatdomain.html#elementsNICS
Provides a virtual LAN with NAT to the outside world. The virtual
network has DHCP & DNS services and will give the guest VM addresses
starting from
10.0.2.15. The default router will be
10.0.2.2 and the DNS server will be
10.0.2.3.
This networking is the only option for unprivileged users who need their
VMs to have outgoing access.
これを静的に設定してみる。