How to install virtual on KVM using virt-install

Preface

It actually took me a really long time and headache how to install RedHat Linux 7 (or compatible) using virt-install and kick start on KVM, mainly because I had many issues with not compatible virtual network or undetectable hard drive. So here is the sample how to use virt-install correctly.

virt-install \
--name=*MACHINE* \
--virt-type=kvm \
--os-type=linux \
--os-varian=rhel7 \
--disk path=*LOGICAL-VOLUME*,bus=scsi \
--ram=8192 \
--network bridge:br0,model=e1000 \
--nographics \
--location http://*INSTALLATION-MEDIA-UNPACKED*/ \
--initrd-inject=/opt/*KICKSTART-FILE*.cfg \
--extra-args="ks=file:/*KICKSTART-FILE*.cfg console=ttyS0,115200" \
--debug \
--accelerate