007-cobbler+koan自动化重装系统

一、操作步骤

1.在使用cobbler自动化安装的虚拟机上做以下操作


2.安装epel源(先配置好yum)


[root@localhost ~]# yum install epel-release -y
2.安装koan工具


[root@localhost ~]# yum install koan -y
3.查看可以重装的列表(还可以装别版本的系统,不过需要在cobbler server制作iso)


[root@localhost ~]# koan --server 192.168.1.231 --list=profiles
- looking for Cobbler at http://192.168.1.231:80/cobbler_api
Centos-7.2-x86_64
4.使用Centos-7.2-x86_64重装系统


[root@localhost ~]# koan --replace-self --server=192.168.1.231 --profile=Centos-7.2-x86_64
- looking for Cobbler at http://192.168.1.231:80/cobbler_api
- reading URL: http://192.168.1.231/cblr/svc/op/ks/profile/Centos-7.2-x86_64
install_tree: http://192.168.1.231/cblr/links/Centos-7.2-x86_64
downloading initrd initrd.img to /boot/initrd.img_koan
url=http://192.168.1.231/cobbler/images/Centos-7.2-x86_64/initrd.img
- reading URL: http://192.168.1.231/cobbler/images/Centos-7.2-x86_64/initrd.img
downloading kernel vmlinuz to /boot/vmlinuz_koan
url=http://192.168.1.231/cobbler/images/Centos-7.2-x86_64/vmlinuz
- reading URL: http://192.168.1.231/cobbler/images/Centos-7.2-x86_64/vmlinuz
- ['/sbin/grubby', '--add-kernel', '/boot/vmlinuz_koan', '--initrd', '/boot/initrd.img_koan', '--args', '"ksdevice=link lang= text net.ifnames=0 ks=http://192.168.1.231/cblr/svc/op/ks/profile/Centos-7.2-x86_64 biosdevname=0 kssendmac "', '--copy-default', '--make-default', '--title=kick1528528891']
- ['/sbin/grubby', '--update-kernel', '/boot/vmlinuz_koan', '--remove-args=root']
- reboot to apply changes

可以充值的原因:

[root@linux-node2 ~]# vim /etc/grub2.cfg


5.重启虚拟机(重启完后,会进行自动安装)


[root@localhost ~]# reboot
6.重装页面

 



原文地址:https://www.cnblogs.com/xuefy/p/11284050.html