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 10.0.0.134 --list=profiles
- looking for Cobbler at http://10.0.0.134:80/cobbler_api
Centos-7.2-x86_64

4.使用Centos-7.2-x86_64重装系统

[root@localhost ~]# koan --replace-self --server=10.0.0.134 --profile=Centos-7.2-x86_64
- looking for Cobbler at http://10.0.0.134:80/cobbler_api
- reading URL: http://10.0.0.134/cblr/svc/op/ks/profile/Centos-7.2-x86_64
install_tree: http://10.0.0.134/cblr/links/Centos-7.2-x86_64
downloading initrd initrd.img to /boot/initrd.img_koan
url=http://10.0.0.134/cobbler/images/Centos-7.2-x86_64/initrd.img
- reading URL: http://10.0.0.134/cobbler/images/Centos-7.2-x86_64/initrd.img
downloading kernel vmlinuz to /boot/vmlinuz_koan
url=http://10.0.0.134/cobbler/images/Centos-7.2-x86_64/vmlinuz
- reading URL: http://10.0.0.134/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://10.0.0.134/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

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

[root@localhost ~]# reboot

6.重装页面



猜你喜欢

转载自blog.csdn.net/liang_operations/article/details/80633336