介紹
koan是kickstart-over-a-network的縮寫,它是cobbler的客戶端幫助程序,koan允許你通過網絡提供虛擬機,也允許你重裝已經存在的客戶端。當運行時,koan會從遠端的cobbler server獲取安裝信息,然后根據獲取的安裝信息進行安裝。
1、在客戶端安裝koan
[root@localhost ~]# yum install -y koan
2、執行安裝命令
[root@localhost ~]# koan --server=192.168.56.133 --list=profiles
- looking for Cobbler at http://192.168.56.133:80/cobbler_api
centos-7-x86_64
3、
在指定要重裝的系統上執行要重裝的哪個系統
[root@localhost ~]# koan --replace-self --server=192.168.56.133 --profile=centos-7-x86_64
- looking for Cobbler at http://192.168.56.130:80/cobbler_api
- reading URL: http://192.168.56.130/cblr/svc/op/ks/profile/CentOS-7-x86_64
install_tree: http://192.168.56.130/cblr/links/CentOS-7-x86_64
downloading initrd initrd.img to /boot/initrd.img_koan
url=http://192.168.56.130/cobbler/images/CentOS-7-x86_64/initrd.img
- reading URL: http://192.168.56.130/cobbler/images/CentOS-7-x86_64/initrd.img
downloading kernel vmlinuz to /boot/vmlinuz_koan
url=http://192.168.56.130/cobbler/images/CentOS-7-x86_64/vmlinuz
- reading URL: http://192.168.56.130/cobbler/images/CentOS-7-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.56.130/cblr/svc/op/ks/profile/CentOS-7-x86_64 biosdevname=0 kssendmac "', '--copy-default', '--make-default', '--title=kick1489851371']
- ['/sbin/grubby', '--update-kernel', '/boot/vmlinuz_koan', '--remove-args=root']
- reboot to apply changes
4、然后重啟就會自動安裝新系統了
修改安裝引導界面提示符(小技巧)
[root@localhost ~]# vim /etc/cobbler/pxe/pxedefault.template