Creating a VM with Centos7, fully automated, inclusive of installation.
This needs a simple Kickstart file. A little example can be taken on CentOS Blog and then edited. A good reference will help in the process.
My Kickstart file: test.ks
install
lang en_US.UTF-8
keyboard us
timezone Europe/Stockholm
auth --useshadow --enablemd5
services --enabled=sshd
ignoredisk --only-use=vda
reboot
cmdline
bootloader --location=mbr
zerombr
clearpart --all --initlabel
autopart
rootpw vmroot
repo --name=base --baseurl=http://mirror.centos.org/centos/7/os/x86_64/
%packages --nobase --ignoremissing
@core
%end
Started with virt-install
like this:
virt-install \
--name test \
--disk "/home/qemu/lol_disk,size=10" \
--memory=2048 \
--os-variant centos7.0 \
--graphics vnc \
--initrd-inject=$PWD/test.ks \
--extra-args ks=file:/test.ks \
--location 'http://mirror.centos.org/centos/7/os/x86_64/'
Just exquisite.