我试图在KVM虚拟机上自动安装CentOS 7的kickstart安装。 我的主机系统也是CentOS 7.我的主机上运行的是vsftp服务器上托pipe的CentOS 7 DVD的内容。 当我运行下面的命令时,安装不会自动启动,而是停止在选定的键盘部分。 我可以通过手动指定我的设置来完成安装,但是我试图让整个安装自动完成。
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
我正在使用的kickstart文件的内容如下:
#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
您的错误是volgroup rhel_outsider1与下面的logvol --vgname=rhel_outsider2的名称不匹配。
你的键盘布局很好。 Anaconda需要一分钟才能在该屏幕上运行所有任务。 任何有错误的将被突出显示,如果没有错误,kickstart将继续。