我想进行 centos 7 的 kickstart 安装,但是 VM 启动后却将我引导至手动文本安装(成功)。
我运行这个命令来开始安装
virt-install --name centos7 --ram 2500 --disk path=/var/lib/libvirt/images/centos7.qcow2,size=8 --vcpus 1 --os-type linux --network bridge=virbr0 --graphics none --console pty,target_type=serial --location 'http://mirror.i3d.net/pub/centos/7/os/x86_64/' --initrd-inject=anaconda-ks.cfg --extra-args 'console=ttyS0,115200n8 serial file:./anaconda-ks.cfg'
这是我的 anaconda-ks.cfg 的内容
你能帮忙吗
#version=DEVEL
# System authorization information
auth --enableshadow --passalgo=sha512
# Install, not upgrade
install
url --url http://mirror.rackspace.com/CentOS/7/os/x86_64/
# Use graphical install
no graphical
# Run the Setup Agent on first boot
firstboot --enable
ignoredisk --only-use=vda
# Keyboard layouts
keyboard --vckeymap=fr-oss --xlayouts='fr (oss)'
# System language
lang fr_FR.UTF-8
# Network information
network --bootproto=dhcp --device=eth0 --onboot=off --ipv6=auto --no-activate
network --hostname=localhost.localdomain
# Root password
rootpw --iscrypted $6$ZHmnThmzueju.0jF$QGe7zbGuzSqKnSUW9eW7W7NIUP6T/Benhwrm4XxNDwbrPqGz5s5205MCvvGfJoRCXkQCEBIWvEvw.Q1BIBUax1
# System services
services --enabled="chronyd"
# System timezone
timezone Europe/Paris --isUtc
user --groups=wheel --name=niort --password=$6$QarIgmCGEUGB0ngM$ooa53.j3lObWuUr65L/JG53T29TpeLG5jRY7wOQsdQH5uVaeXrXytR/yhCFea9Fa2swxRS3pAp2iLhf/fDW3a/ --iscrypted --gecos="niort"
# System bootloader configuration
bootloader --append=" crashkernel=auto" --location=mbr --boot-drive=vda
autopart --type=lvm
# Partition clearing information
clearpart --none --initlabel
%packages
@^minimal
@core
chrony
kexec-tools
%end
%addon com_redhat_kdump --enable --reserve-mb='auto'
%end
%anaconda
pwpolicy root --minlen=6 --minquality=1 --notstrict --nochanges --notempty
pwpolicy user --minlen=6 --minquality=1 --notstrict --nochanges --emptyok
pwpolicy luks --minlen=6 --minquality=1 --notstrict --nochanges --notempty
%end