cobbler 安装esxi6

挂载esxi6镜像

[root@cobbler ~]# mount  -o loop -t iso9660 /dev/cdrom /media/CentOS/

导入镜像

[root@cobbler ~]# cobbler import --path=/media/CentOS/ --name=esxi-6.5
task started: 2020-02-06_055559_import
task started (id=Media import, time=Thu Feb  6 05:55:59 2020)
Found a candidate signature: breed=suse, version=opensuse15.0
Found a candidate signature: breed=suse, version=opensuse15.1
Found a candidate signature: breed=vmware, version=esxi65
running: /usr/bin/file /var/www/cobbler/ks_mirror/esxi-6.5/vmware-esx-base-osl.txt
received on stdout: /var/www/cobbler/ks_mirror/esxi-6.5/vmware-esx-base-osl.txt: UTF-8 Unicode text, with very long lines, with CRLF, CR line terminators

received on stderr: 
Found a matching signature: breed=vmware, version=esxi65
Adding distros from path /var/www/cobbler/ks_mirror/esxi-6.5:
running: /usr/bin/file /var/www/cobbler/ks_mirror/esxi-6.5/tools.t00
received on stdout: /var/www/cobbler/ks_mirror/esxi-6.5/tools.t00: gzip compressed data, was "tools-light.tar", from Unix, last modified: Tue Apr 17 01:17:29 2018

received on stderr: 
creating new distro: esxi-6.5-x86_64
trying symlink: /var/www/cobbler/ks_mirror/esxi-6.5 -> /var/www/cobbler/links/esxi-6.5-x86_64
creating new profile: esxi-6.5-x86_64
associating repos
*** TASK COMPLETE ***

编辑kickstart文件

cd /var/lib/cobbler/kickstarts
cp sample_esxi6.ks esxi6-ks.cfg
vi esxi6-ks.cfg
vmaccepteula
reboot --noeject
rootpw --iscrypted $1$z2tsxpd8$TB93OFDOBBtth92GZhsUU1

install --firstdisk --overwritevmfs
clearpart --firstdisk --overwritevmfs

#$SNIPPET('network_config')
network --bootproto=dhcp
%pre --interpreter=busybox

$SNIPPET('kickstart_start')
$SNIPPET('pre_install_network_config')

%post --interpreter=busybox
r=busybox
$SNIPPET('kickstart_done')

编辑profile

[root@cobbler ~]# cobbler profile edit --name=esxi-6.5-x86_64 --kickstart=/var/lib/cobbler/kickstarts/esxi6-ks.cfg
cobbler sync
[root@cobbler tftpboot]# cat pxelinux.cfg/default 
DEFAULT menu
PROMPT 0
MENU TITLE Cobbler | http://cobbler.github.io/
TIMEOUT 200
TOTALTIMEOUT 6000
ONTIMEOUT local

LABEL local
        MENU LABEL (local)
        MENU DEFAULT
        LOCALBOOT -1

LABEL CentOS7.3.1611-x86_64
        kernel /images/CentOS7.3.1611-x86_64/vmlinuz
        MENU LABEL CentOS7.3.1611-x86_64
        append initrd=/images/CentOS7.3.1611-x86_64/initrd.img ksdevice=bootif lang=  kssendmac text  ks=http://192.168.2.1/cblr/svc/op/ks/profile/CentOS7.3.1611-x86_64
        ipappend 2

LABEL Centos7.3-2
        kernel /images/CentOS7.3.1611-x86_64/vmlinuz
        MENU LABEL Centos7.3-2
        append initrd=/images/CentOS7.3.1611-x86_64/initrd.img ksdevice=bootif lang=  kssendmac text  ks=http://192.168.2.1/cblr/svc/op/ks/profile/Centos7.3-2
        ipappend 2

LABEL esxi-6.5-x86_64
        kernel /images/esxi-6.5-x86_64/mboot.c32
        MENU LABEL esxi-6.5-x86_64
        ipappend 2
        append -c /images/esxi-6.5-x86_64/cobbler-boot.cfg

sed -i ‘s@/@@g’ /var/www/cobbler/ks_mirror/esxi-6.5/boot.cfg
编辑kernelopt 指向cobbler的ks
kernelopt=ks=http://192.168.2.1/cblr/svc/op/ks/profile/esxi-6.5-x86_64
在这里插入图片描述编辑两个配置文件
在这里插入图片描述
然后cobbler sync

在这里插入图片描述

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值