KVMゲストをKickstartでインストールする
# mount -o loop -r /var/kvm/iso/CentOS-6.3-x86_64-bin-DVD1.iso /var/www/html/os/CentOS-6.3-x86_64
詳細オプションはこちらのページを参照
# vi /var/www/html/kickstart/ks-vmguest.cfg
install cdrom lang ja_JP.UTF-8 keyboard jp106 network --onboot yes --device eth0 --bootproto static --ip 192.168.0.xx --netmask 255.255.255.0 --gateway 192.168.0.xx --noipv6 --nameserver 192.168.0.xx --hostname vmguest rootpw --iscrypted $6$AGH7aQd7UdEogH6l$yN2bi3da40jG6gC3vyYLnnUhhGyh7oetWudcYGFHx0hLjUf.psRRQktrFvHD1T59JP6/733MJGVEtiXoNGmX./ firewall --service=ssh authconfig --enableshadow --passalgo=sha512 selinux --disabled timezone Asia/Tokyo bootloader --location=mbr --driveorder=vda --append="ttyS0,115200n8 crashkaernel=auto" # bootloader --location=mbr --driveorder=vda --append="crashkernel=auto rhgb quiet" # 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 --all --initlabel --drives=vda part /boot --fstype=ext4 --size=500 --ondisk=vda part pv.253002 --grow --size=198 --ondisk=vda volgroup vg_vmguest --pesize=4096 pv.253002 logvol swap --name=LogVol00 --vgname=vg_vmguest --size=2048 logvol / --fstype=ext4 --name=LogVol01 --vgname=vg_vmguest --size=4096 --grow %packages @base @core @development @japanese-support @server-policy sgpio %end reboot
# virt-install --connect qemu:///system --name vmguest03 --vcpus=1 --ram 1024 --os-type=linux --os-variant=rhel6 --disk bus=virtio,cache=writethrough,path=/export/kvm/images/vmguest.raw --network bridge=br1,model=virtio --location='http://192.168.0.xx/os/CentOS-6.3-x86_64' --extra-args='ks=http://192.168.0.xx/kickstart/ks-vmguest.cfg console=tty0 console=ttyS0,11520n8'
最新コメント