Kickstart install Centos 6 using virt-install


virt-install --connect=qemu:///system --network=bridge:virbr0 --initrd-inject=/tmp/centos.ks --extra-args="ks=file:/centos.ks console=tty0 console=ttyS0,115200" \
--name=centos \
--disk /var/lib/libvirt/images/centos.qcow2,size=10,device=disk,bus=virtio,format=qcow2 \
--ram 750 \
--vcpus=1 \
--check-cpu \
--accelerate \
--hvm \
--location=http://mirror.duomenucentras.lt/centos/6/os/x86_64/ \
--nographics

I am using kickstart file:

text
install
lang en_US.UTF-8
keyboard uk
network –bootproto=dhcp –device=eth0
reboot
authconfig –enableshadow –passalgo=sha512
selinux –enforcing
timezone –utc Europe/Vilnius
bootloader –location=mbr –driveorder=vda –append=”crashkernel=auto rhgb quiet”
zerombr
ignoredisk –only-use=vda
clearpart –linux –drives=vda –all –initlabel
rootpw  mypassword
#autopart
part /boot –fstype=ext4 –size=50
part / –fstype=ext4 –size=2000 –grow
part swap –size=500
part /home –fstype=ext4 –size=500
%packages –excludedocs –nobase
@Core
acpid

Leave a Reply

Your email address will not be published. Required fields are marked *