前几天在给公司办公网搭建Cobbler自动安装centos系统环境,今天搞了一下安装ESXI5.1,记录一下过程:

1、挂载镜像文件并导入Cobbler:

mount -o loop /data/ESXI-5.1.0-799733-STANDARD_FOR_HPDL380.iso /data/Esxi5.1_HP
cobbler import --path=/data/Esxi5.1_HP/ --name=Esxi5.1_HP380 --arch=x86_64

2、同步一下配置:

cobbler sync

3、镜像会导入到/var/www/cobbler/ks_mirror/下面,在/var/www/cobbler/ks_mirror/Esxi5.1_HP380-x86_64下面建立esxi的网络启动文件cobbler-boot.cfg

[root@yw_0_0 Esxi5.1_HP380-x86_64]# vi cobbler-boot.cfg
bootstate=0
title=Cobbler - Loading ESXi installer
kernel=tboot.b00
kernelopt=ks=https://10.10.254.1/cblr/svc/op/ks/profile/Esxi5.1_HP380-x86_64
modules=b.b00 --- useropts.gz --- k.b00 --- chardevs.b00 --- a.b00 --- user.b00 --- s.v00 --- misc_cni.v00 --- net_bnx2.v00 --- net_bnx2.v01 --- net_cnic.v00 --- net_tg3.v00 --- net_tg3.v01 --- scsi_bnx.v00 --- scsi_bnx.v01 --- net_bna.v00 --- scsi_bfa.v00 --- ima_be2i.v00 --- scsi_be2.v00 --- net_igb.v00 --- scsi_mpt.v00 --- ima_qla4.v00 --- net_qlcn.v00 --- scsi_qla.v00 --- ata_pata.v00 --- ata_pata.v01 --- ata_pata.v02 --- ata_pata.v03 --- ata_pata.v04 --- ata_pata.v05 --- ata_pata.v06 --- ata_pata.v07 --- block_cc.v00 --- ehci_ehc.v00 --- weaselin.t00 --- esx_dvfi.v00 --- xlibs.v00 --- ipmi_ipm.v00 --- ipmi_ipm.v01 --- ipmi_ipm.v02 --- misc_dri.v00 --- net_be2n.v00 --- net_e100.v00 --- net_e100.v01 --- net_enic.v00 --- net_forc.v00 --- net_ixgb.v00 --- net_nx_n.v00 --- net_qlge.v00 --- net_r816.v00 --- net_r816.v01 --- net_s2io.v00 --- net_sky2.v00 --- net_vmxn.v00 --- ohci_usb.v00 --- sata_ahc.v00 --- sata_ata.v00 --- sata_sat.v00 --- sata_sat.v01 --- sata_sat.v02 --- sata_sat.v03 --- sata_sat.v04 --- scsi_aac.v00 --- scsi_adp.v00 --- scsi_aic.v00 --- scsi_fni.v00 --- scsi_hps.v00 --- scsi_ips.v00 --- scsi_lpf.v00 --- scsi_meg.v00 --- scsi_meg.v01 --- scsi_meg.v02 --- scsi_mpt.v01 --- scsi_mpt.v02 --- scsi_rst.v00 --- uhci_usb.v00 --- tools.t00 --- scsi_qla.v01 --- dell_con.v00 --- xorg.v00 --- imgdb.tgz --- imgpayld.tgz
build=
updated=0

4、撰写esxi5-ks.cfg配置文件,默认是空的:

# Sample scripted installation file
# for ESXi 5+
#
vmaccepteula
rootpw 123456
clearpart --firstdisk --overwritevmfs
install --firstdisk --overwritevmfs
network --bootproto=dhcp --device=vmnic0
reboot --noeject

5、登录Cobbler的web管理,点击Profiles,找到刚导入的Esxi5.1_HP380-x86_64,点击“编辑”,把Kickstart的路径改为:/var/lib/cobbler/kickstarts/esxi5-ks.cfg,点击“Save”,就ok了。

6、需要安装系统的机器从网卡启动就可以了:

Cobbler自动安装系统(ESXI5.1)_第1张图片

Cobbler自动安装系统(ESXI5.1)_第2张图片