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