Create a gist now

Instantly share code, notes, and snippets.

CentOS 6.3 install on KVM from kickstart
# Kickstart file automatically generated by anaconda.
#version=RHEL6
install
rootpw --iscrypted [HASH PASSWORD]
text
keyboard us
lang en_US.UTF-8
selinux --disabled
timezone --utc Asia/Tokyo
network --device eth0 --bootproto dhcp
url --url=http://ftp.jaist.ac.jp/pub/Linux/CentOS/6.3/os/x86_64/
bootloader --location=mbr --driveorder=vda
zerombr
clearpart --all
part /boot --fstype ext3 --size=100 --ondisk=vda
part swap --size=2048
part / --fstype ext4 --size=1 --grow
%packages --nobase
@development
sysstat
%post
yum -y update
echo "ttyS0" >> /etc/securetty
virt-install --connect qemu:///system \
--name [VM NAME] \
--vcpus 1 \
--ram=512 \
--hvm \
--location http://ftp.jaist.ac.jp/pub/Linux/CentOS/6.3/os/x86_64/ \
--os-type=Linux \
--os-variant=virtio26 \
--disk=/var/lib/libvirt/images/[DISKNAME].img \
--network bridge=br0 \
--extra-args='ks=http://[HOSTNAME]/centos6.ks console=tty0 console=ttyS0,115200n8'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment