cobbler+koan自动化重装系统

本文介绍如何通过Cobbler实现虚拟机系统的自动化重装过程。首先安装epel源和koan工具,然后利用koan工具连接Cobbler服务器并获取可用的系统配置文件。选择目标操作系统版本进行重装,并自动下载所需的内核和初始化映像文件。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

一、操作步骤

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.重装页面



评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值