1

I want to setup a kickstart to install a VM with KVM. How do I instruct KVM to accept the EULA and then shutdown the VM at the end of the installation? Here is an extract of my kickstart. I have tried to put the eula instruction before the shutdown but still installation stoped for me to accept the EULA and did not shutdown after that.

#version=DEVEL
# System authorization information
auth --enableshadow --passalgo=sha512
# Use network installation
url --url="ftp://192.168.100.1/pub/inst"
# Use graphical install
graphical
# Run the Setup Agent on first boot
firstboot --enable
ignoredisk --only-use=vda
# Keyboard layouts
keyboard --vckeymap=us --xlayouts='us'
# System language
lang en_US.UTF-8

# Network information
#network  --bootproto=dhcp --device=eth0 --ipv6=auto --activate
network  --bootproto=static --device=eth0 --gateway=192.168.100.1 --ip=192.168.100.151 --netmask=255.255.255.0 --nameserver=192.168.100.1 --activate
network  --hostname=server.example.com

# Root password
rootpw --iscrypted $6$Kvuu9o2KGb35V8tO$gpHiAYy74tbhEO2rtruyGLNSnajNqfo9aB0/llewAO4o6ExsvFEFgkiprUdZRY5Zv/kj0PxnrimlcYmRIAWKq/
# System services
services --enabled="chronyd"
# System timezone
timezone Europe/Dublin --isUtc
user --name=user1 --password=$6$9sYmWd77jFtPW1Yq$GdTp3.trrKZfPJq92Edy0uI1De46Urel9biSrYUB/TKkXgowck5u0lQxiwe4HTy6D7I7fGQwkelJJOApYZ2a00 --iscrypted --gecos="user1"
# X Window System configuration information
xconfig  --startxonboot
# System bootloader configuration
bootloader --append=" crashkernel=auto" --location=mbr --boot-drive=vda
#autopart --type=lvm
# Partition clearing information
clearpart --all --initlabel --drives=vda
part /boot --fstype="xfs" --size=500
part swap --fstype="swap" --size=1000
part / --fstype="xfs" --size=10000
part /home --fstype="xfs" --size=1000

shutdown
eula --agreed

%packages
@^graphical-server-environment
@base
@core
@desktop-debugging
@dial-up
@fonts
@gnome-desktop
@guest-agents
@guest-desktop-agents
@input-methods
@internet-browser
@multimedia
@print-client
@x11
chrony
kexec-tools

%end

%addon com_redhat_kdump --enable --reserve-mb='auto'

%end
5
  • That really shouldn't happen. I'd first try using poweroff instead of shutdown, and then if that doesn't work, open a support case with Red Hat. Mar 7, 2017 at 1:12
  • 1
    Are you installing RHEL? I've never had the need to actually even mention the eula in a kickstart. Try to generate a valid kickstart at access.redhat.com/labsinfo/kickstartconfig
    – dyasny
    Mar 7, 2017 at 1:13
  • I am using centos 7 Mar 7, 2017 at 1:14
  • 1) post your entire kickstart file 2) %post poweroff %end Mar 7, 2017 at 4:35
  • @jacobevans I have added the entire kickstart here Mar 14, 2017 at 4:16

2 Answers 2

2

To avoid the eula you also need to disable 'firstboot' which you currently have enabled

# Run the Setup Agent on first boot
firstboot --enable

Change that to:

# Run the Setup Agent on first boot
firstboot --disabled

Then the eula --agreed should take effect (though it's redundant here).

0
#version=DEVEL
# System authorization information
auth --enableshadow --passalgo=sha512
# Use network installation
url --url="ftp://192.168.100.1/pub/inst"
# Use graphical install
graphical
# Run the Setup Agent on first boot
firstboot --enable
ignoredisk --only-use=vda
# Keyboard layouts
keyboard --vckeymap=us --xlayouts='us'
# System language
lang en_US.UTF-8
poweroff

# Network information
#network  --bootproto=dhcp --device=eth0 --ipv6=auto --activate
network  --bootproto=static --device=eth0 --gateway=192.168.100.1 --ip=192.168.100.151 --netmask=255.255.255.0 --nameserver=192.168.100.1 --activate
network  --hostname=server.example.com

# Root password
rootpw --iscrypted $6$Kvuu9o2KGb35V8tO$gpHiAYy74tbhEO2rtruyGLNSnajNqfo9aB0/llewAO4o6ExsvFEFgkiprUdZRY5Zv/kj0PxnrimlcYmRIAWKq/
# System services
services --enabled="chronyd"
# System timezone
timezone Europe/Dublin --isUtc
user --name=user1 --password=$6$9sYmWd77jFtPW1Yq$GdTp3.trrKZfPJq92Edy0uI1De46Urel9biSrYUB/TKkXgowck5u0lQxiwe4HTy6D7I7fGQwkelJJOApYZ2a00 --iscrypted --gecos="user1"
# X Window System configuration information
xconfig  --startxonboot
# System bootloader configuration
bootloader --append=" crashkernel=auto" --location=mbr --boot-drive=vda
#autopart --type=lvm
# Partition clearing information
clearpart --all --initlabel --drives=vda
part /boot --fstype="xfs" --size=500
part swap --fstype="swap" --size=1000
part / --fstype="xfs" --size=10000
part /home --fstype="xfs" --size=1000

%packages
@^graphical-server-environment
@base
@core
@desktop-debugging
@dial-up
@fonts
@gnome-desktop
@guest-agents
@guest-desktop-agents
@input-methods
@internet-browser
@multimedia
@print-client
@x11
chrony
kexec-tools

%end

%addon com_redhat_kdump --enable --reserve-mb='auto'

%end

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .