A short overview about how to install an ESXi5 server via PXE boot using the following steps.
- Set up a PXE boot server
- Copy the content of the ESXi5 ISO to a directory
- Edit VMware’s boot.cfg file
- Create a ks.cfg file for unattended installation
- Edit the PXE boot config file
Step 1 Set up a PXE boot server
Step 2 Copy the content of the ESXi5 ISO to a directory
mkdir /mnt/cdrom mkdir /tftpboot/images/vsphere/esxi5.0 mount -o loop VMware-VMvisor-Installer-5.0.0-469512.x86_64.iso /media/tmp
or
mount /dev/cdrom/ /mnt/cdrom cp -rav /mnt/cdrom/* /tftpboot/images/vsphere/esxi5.0 chmod -R +w /tftpboot/images/vsphere/esxi5.0
Then change the filenames from uppercase to lowercase:
find . -print0 | xargs -0n 1 bash -c 's=$(dirname "$0")/$(basename "$0");
d=$(dirname "$0")/$(basename "$0"|tr "[A-Z]" "[a-z]"); mv -f "$s" "$d"'
Step 3: Edit VMware’s boot.cfg file
vi /tftpboot/images/vsphere/esxi5.0/boot.cfg
bootstate=0
title=Loading ESXi installer
prefix=/images/vmware/esxi/5.1/
kernel=tboot.b00 kernelopt=runweasel
modules=b.b00 --- useropts.gz --- k.b00 --- chardevs.b00 --- a.b00 --- user.b00 --- s.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 --- ima_qla4.v00 --- ipmi_ipm.v00 --- ipmi_ipm.v01 --- ipmi_ipm.v02 --- misc_cni.v00 --- misc_dri.v00 --- net_be2n.v00 --- net_bnx2.v00 --- net_bnx2.v01 --- net_cnic.v00 --- net_e100.v00 --- net_e100.v01 --- net_enic.v00 --- net_forc.v00 --- net_igb.v00 --- net_ixgb.v00 --- net_nx_n.v00 --- net_r816.v00 --- net_r816.v01 --- net_s2io.v00 --- net_sky2.v00 --- net_tg3.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_bnx.v00 --- scsi_fni.v00 --- scsi_hps.v00 --- scsi_ips.v00 --- scsi_lpf.v00 --- scsi_meg.v00 --- scsi_meg.v01 --- scsi_meg.v02 --- scsi_mpt.v00 --- scsi_mpt.v01 --- scsi_mpt.v02 --- scsi_qla.v00 --- scsi_qla.v01 --- scsi_rst.v00 --- uhci_usb.v00 --- tools.t00 --- xorg.v00 --- imgdb.tgz --- imgpayld.tgz
build=
updated=0
Step 4: Create a ks.cfg script (this one is not working yet for 5.1)
#
# Sample scripted installation file
#
# Accept the VMware End User License Agreement
vmaccepteula
# Set the root password for the DCUI and Tech Support Mode
rootpw mypassword
# The install media is in the CD-ROM drive
install --firstdisk --overwritevmfs
# Set the network to DHCP on the first network adapater
network --bootproto=dhcp --device=vmnic0
# A sample post-install script
%post --interpreter=python --ignorefailure=true
import time
stampFile = open('/finished.stamp', mode='w')
stampFile.write( time.asctime() )
Make the script available on a webserver. Use the URL to the file in step 5. Read more about scripting here: http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2004582
Step 5: Edit the PXE boot config file
vi /tftpboot/pxelinux.cfg/default
LABEL ESXi 5.1 PXE Manual Install
KERNEL images/vmware/esxi/5.1/mboot.c32
APPEND -c images/vmware/esxi/5.1/boot.cfg +++
IPAPPEND 1
LABEL ESXi 5.1 PXE Load Into Memory
KERNEL images/vmware/esxi/5.1/mboot.c32
APPEND -c images/vmware/esxi/5.1/boot.cfg pxebooting +++
IPAPPEND 1
Leave a Reply