CentOS 7 kickstart接受EULA并closures

我想设置一个kickstart来安装一个虚拟机与KVM。 如何指示KVM接受EULA,然后在安装结束时closuresVM? 这是我的kickstart的摘录。 我已经尝试在shutdown之前放置eula指令,但是仍然安装shutdown接受EULA,之后没有closures。

 #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 

为了避免eula,你还需要禁用当前启用的“firstboot”

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

将其更改为:

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

那么eula --agreed应该生效(尽pipe在这里是多余的)。

 #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