I am trying to automate the kickstart install of CentOS 7 on a KVM virtual machine. My host system is also CentOS 7. I have the contents of the CentOS 7 DVD hosted on a vsftp server running on my host machine. When I run the below command, the installation does not start automatically, instead it stops on the select keyboard portion. I can complete the installation by specifying my settings manually, however I am trying to get the entire installation to complete automatically.

sudo virt-install -n outsider2.example.org -r 1024 --disk path=/var/lib/libvirt/images/outsider2.example.org.img,size=16 -l --noautoconsole -x

The contents of the kickstart file I am using are below:

# System authorization information
auth --enableshadow --passalgo=sha512

ignoredisk --only-use=vda
# Keyboard layouts
keyboard --vckeymap=us --xlayouts='us'
# System language
lang en_US.UTF-8

# Network information
network  --bootproto=static --device=em0 --gateway= --ip= --netmask= --ipv6=auto --activate
network  --hostname=outsider2.example.org
# Root password
rootpw --iscrypted $6$f/dv93KmK1kDGrrA$LMvsl5cdPTdhpqLPBUxzRnxfmHevZuav2kSOVjGWNKkRHwE0nxCeXCR3l/ohakXJxJ96775iDbUUh10b60qy60
# System timezone
timezone America/New_York --isUtc
# X Window System configuration information
xconfig  --startxonboot
# System bootloader configuration
bootloader --location=mbr --boot-drive=vda
# Partition clearing information
clearpart --all --initlabel --drives=vda
# Disk partitioning information
part /boot --fstype="xfs" --ondisk=vda --size=500
part pv.1 --fstype="lvmpv" --ondisk=vda --size=12008
volgroup rhel_outsider1 --pesize=4096 pv.1
logvol /home  --fstype="xfs" --size=1000 --name=home --vgname=rhel_outsider2
logvol /  --fstype="xfs" --size=10000 --name=root --vgname=rhel_outsider2
logvol swap  --fstype="swap" --size=1000 --name=swap --vgname=rhel_outsider2



Your error is that volgroup rhel_outsider1 does not match the name of the logvol --vgname=rhel_outsider2 that follow.

Your keyboard layout is fine. It takes a minute for Anaconda to run all tasks on that screen. Any with errors will be highlighted, and if there are no errors the kickstart will proceed.

  • Turns out it was actually that I was missing ks= in argument I was passing in the virt-install command so it never actually loaded the Kickstart file. The error you pointed out did manifest while running the install (it stopped on the hard drive config step). Ksvalidator didn't catch that because partition configuration is one thing it doesn't fully validate. – AdnanEK Jan 24 '17 at 9:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.