Wednesday, October 10, 2012

PXE Boot ESXi Installation with RHEL PXE server



PXE Boot ESXi Installation with RHEL PXE server

·         PXE System Requirements (RHEL 6)
[root@cobtest tftpboot]# uname -a
Linux cobtest.domain.com 2.6.32-279.el6.x86_64 #1 SMP Wed Jun 13 18:24:36 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux
[root@cobtest tftpboot]# rpm -q syslinux
syslinux-4.02-7.el6.x86_64
[root@cobtest tftpboot]# rpm -q tftp-server
tftp-server-0.49-7.el6.x86_64
Note: RHEL 5 and systelinux 3.x will not work

·         Install and configure tftp server(documentation out of scope of this document)

·         Copy menu.32 and pxelinux.0 to tftp root directory
[root@cobtest tftpboot]# cp /usr/share/syslinux/pxelinux.0    /var/lib/tftpboot/
[root@cobtest tftpboot]# cp /usr/share/syslinux/menu.c32      /var/lib/tftpboot/

·         Create a mac address file in pxelinux.cfg directory
E.g. system mac address 00:1F:29:DE:76:C6
[root@cobtest tftpboot]# cat /var/lib/tftpboot/pxelinux.cfg/01-00-1f-29-de-76-c6
DEFAULT menu.c32
MENU TITLE ESXi-5.1.0-799733-standard Boot Menu
NOHALT 1
PROMPT 0
TIMEOUT 80
LABEL install
  KERNEL /esxi5.1/mboot.c32
  APPEND -c /esxi5.1/boot.cfg
  MENU LABEL ESXi-5.1.0-799733-standard ^Installer
LABEL hddboot
  LOCALBOOT 0x80
  MENU LABEL ^Boot from local disk

·         Mount the iso image and copy contents into esxi directory
[root@cobtest tftpboot]# ls /var/lib/tftpboot/esxi5.1/
a.b00         bak2.boot.cfg  ehci_ehc.v00  isolinux.cfg  net_e100.v00  net_s2io.v00  sata_sat.v00  scsi_fni.v00  scsi_mpt.v02  user.b00
ata_pata.v00  bak.boot.cfg   esx_dvfi.v00  k.b00         net_e100.v01  net_sky2.v00  sata_sat.v01  scsi_hps.v00  scsi_qla.v00  useropts.gz
ata_pata.v01  b.b00          ima_qla4.v00  mboot.c32     net_enic.v00  net_tg3.v00   sata_sat.v02  scsi_ips.v00  scsi_qla.v01  vmware-esx-base-osl.txt
ata_pata.v02  block_cc.v00   imgdb.tgz     misc_cni.v00  net_forc.v00  net_vmxn.v00  sata_sat.v03  scsi_lpf.v00  scsi_rst.v00  vmware-esx-base-readme
ata_pata.v03  boot.cat       imgpayld.tgz  misc_dri.v00  net_igb.v00   ohci_usb.v00  sata_sat.v04  scsi_meg.v00  s.v00         weaselin.t00
ata_pata.v04  boot.cfg       ipmi_ipm.v00  net_be2n.v00  net_ixgb.v00  pxelinux.0    scsi_aac.v00  scsi_meg.v01  tboot.b00     xlibs.v00
ata_pata.v05  chardevs.b00   ipmi_ipm.v01  net_bnx2.v00  net_nx_n.v00  safeboot.c32  scsi_adp.v00  scsi_meg.v02  tools.t00     xorg.v00
ata_pata.v06  efi            ipmi_ipm.v02  net_bnx2.v01  net_r816.v00  sata_ahc.v00  scsi_aic.v00  scsi_mpt.v00  uhci_usb.v00
ata_pata.v07  efiboot.img    isolinux.bin  net_cnic.v00  net_r816.v01  sata_ata.v00  scsi_bnx.v00  scsi_mpt.v01  upgrade

·         Edit boot.cfg file, modify module path and add kickstart information
[root@cobtest tftpboot]# cat /var/lib/tftpboot/esxi5.1/boot.cfg
bootstate=0
title=Loading ESXi installer
kernel=/esxi5.1/tboot.b00
kernelopt=http://192.168.100.10/vmks.cfg
modules=/esxi5.1/b.b00 --- /esxi5.1/useropts.gz --- /esxi5.1/k.b00 --- /esxi5.1/chardevs.b00 --- /esxi5.1/a.b00 --- /esxi5.1/user.b00 --- /esxi5.1/s.v00 --- /esxi5.1/ata_pata.v00 --- /esxi5.1/ata_pata.v01 --- /esxi5.1/ata_pata.v02 --- /esxi5.1/ata_pata.v03 --- /esxi5.1/ata_pata.v04 --- /esxi5.1/ata_pata.v05 --- /esxi5.1/ata_pata.v06 --- /esxi5.1/ata_pata.v07 --- /esxi5.1/block_cc.v00 --- /esxi5.1/ehci_ehc.v00 --- /esxi5.1/weaselin.t00 --- /esxi5.1/esx_dvfi.v00 --- /esxi5.1/xlibs.v00 --- /esxi5.1/ima_qla4.v00 --- /esxi5.1/ipmi_ipm.v00 --- /esxi5.1/ipmi_ipm.v01 --- /esxi5.1/ipmi_ipm.v02 --- /esxi5.1/misc_cni.v00 --- /esxi5.1/misc_dri.v00 --- /esxi5.1/net_be2n.v00 --- /esxi5.1/net_bnx2.v00 --- /esxi5.1/net_bnx2.v01 --- /esxi5.1/net_cnic.v00 --- /esxi5.1/net_e100.v00 --- /esxi5.1/net_e100.v01 --- /esxi5.1/net_enic.v00 --- /esxi5.1/net_forc.v00 --- /esxi5.1/net_igb.v00 --- /esxi5.1/net_ixgb.v00 --- /esxi5.1/net_nx_n.v00 --- /esxi5.1/net_r816.v00 --- /esxi5.1/net_r816.v01 --- /esxi5.1/net_s2io.v00 --- /esxi5.1/net_sky2.v00 --- /esxi5.1/net_tg3.v00 --- /esxi5.1/net_vmxn.v00 --- /esxi5.1/ohci_usb.v00 --- /esxi5.1/sata_ahc.v00 --- /esxi5.1/sata_ata.v00 --- /esxi5.1/sata_sat.v00 --- /esxi5.1/sata_sat.v01 --- /esxi5.1/sata_sat.v02 --- /esxi5.1/sata_sat.v03 --- /esxi5.1/sata_sat.v04 --- /esxi5.1/scsi_aac.v00 --- /esxi5.1/scsi_adp.v00 --- /esxi5.1/scsi_aic.v00 --- /esxi5.1/scsi_bnx.v00 --- /esxi5.1/scsi_fni.v00 --- /esxi5.1/scsi_hps.v00 --- /esxi5.1/scsi_ips.v00 --- /esxi5.1/scsi_lpf.v00 --- /esxi5.1/scsi_meg.v00 --- /esxi5.1/scsi_meg.v01 --- /esxi5.1/scsi_meg.v02 --- /esxi5.1/scsi_mpt.v00 --- /esxi5.1/scsi_mpt.v01 --- /esxi5.1/scsi_mpt.v02 --- /esxi5.1/scsi_qla.v00 --- /esxi5.1/scsi_qla.v01 --- /esxi5.1/scsi_rst.v00 --- /esxi5.1/uhci_usb.v00 --- /esxi5.1/tools.t00 --- /esxi5.1/xorg.v00 --- /esxi5.1/imgdb.tgz --- /esxi5.1/imgpayld.tgz
build=
updated=0

·         Minimal kickstart sample
[root@www ~]# cat /var/www/html/vmks.cfg
#
# Sample scripted installation file
#
# Accept the VMware End User License Agreement
vmaccepteula
# Set the root password for the DCUI and Tech Support Mode
rootpw esxipassword
# The install media is in the CD-ROM drive
install --firstdisk=1 --overwritevmfs
# Set the network to DHCP on the first network adapater
network --bootproto=dhcp --device=vmnic0

Note: Vmware Vsphere ESXi5.1 does work on cobbler version 2.2.3-2.el5

·         Reference Documents
Installation:

Kickstart Info


·         ESXi System information in dhcpd.conf (Reference only)
    host esxi.domain.com {
        hardware ethernet 00:1F:29:DE:76:C6;
        fixed-address 192.168.100.129;
        option host-name "esxi.domain.com";
        option routers 192.168.100.240;
        filename "/pxelinux.0";
        next-server 192.168.100.88;
    }

2 comments:

Anonymous said...

it just boots up with files, but files are not installed.

Anonymous said...

you are correct.