yum install system-config-kickstart -y
system-config-kickstart ##执行过程如下图
生成一个ks.cfg文件保存在/root下
vim /root/ks.cfg
vim /mnt/vmcreate
#!/bin/bash
virt-install \
--name $* \
--ram 1000 \
--file /var/lib/libvirt/p_w_picpaths/$*.img \
--file-size 8 \
--location http://172.25.254.85/rhel7.0 \ ##将7.0的镜像挂载到/var/www/html/rhel7.0
--extra-args http://172.25.254.85/ks.cfg ##172.25.254.8 是本人真机的ip
--vnc
chmod +x /mnt/vmcreate
/mnt/vmcreate