仮想サーバーコマンド(virt-install)&ks.cfgファイル


virt-installのメモ

■virt-installの中身

sudo /usr/sbin/virt-install \
--connect qemu:///system \
--name=nishi2 \
--ram=512 \
--file=/var/lib/libvirt/images/nishi2.img \
--file-size=5 \
--vcpus=2 \
--os-type=linux \
--os-variant=rhel5 \
--network bridge=br0 \
--nographics \
--accelerate \
--hvm \
--location='http://192.168.1.21/ISO2' \
--extra-args="ks=http://192.168.1.21:80/KS/ks.cfg ksdevice=eth0 ip=192.168.1.23 netmask=255.255.255.0 gateway=192.168.1.1 console=tty0 console=ttyS0,115200n8"

■ks.cfgファイルの中身

install
url --url http://192.168.1.21/ISO2
lang en_US.UTF-8
keyboard us
network --device eth0 --bootproto static --ip 192.168.1.24 --netmask 255.255.255.0 --gateway 192.168.1.1 --nameserver 192.168.1.11 --hostname mori_lab3
rootpw morimori5963
firewall --enabled --port=22:tcp
authconfig --enableshadow --enablemd5
selinux --enforcing
timezone Asia/Tokyo
bootloader --location=mbr --driveorder=hda --append="console=ttyS0,115200n8"
clearpart --all --initlabel
autopart

%packages
@admin-tools
@base
@core
@development-libs
@development-tools
@editors
reboot