0

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 ftp://192.168.122.1/pub/inst --noautoconsole -x ftp://192.168.122.1/pub/ks2.cfg

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

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


graphical
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=192.168.122.1 --ip=192.168.100.101 --netmask=255.255.255.0 --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

%packages
@base
@core
@desktop-debugging
@dial-up
@fonts
@gnome-desktop
@guest-agents
@guest-desktop-agents
@input-methods
@internet-browser
@multimedia
@print-client
@x11

%end
AdnanEK
  • 1
  • 1

1 Answers1

1

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.

John Mahowald
  • 32,050
  • 2
  • 19
  • 34
  • 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 09:51