You can customize the standard ESXi installer ISO image with your own installation or upgrade script. This customization enables you to perform a scripted, unattended installation or upgrade when you boot the resulting installer ISO image.

See also About Installation and Upgrade Scripts and About the boot.cfg File.

Prerequisites

  • Linux machine
  • The ESXi ISO image VMware-VMvisor-Installer-x.x.x-XXXXXX.x86_64.iso,where x.x.x is the version of ESXi you are installing, and XXXXXX is the build number of the installer ISO image
  • Your custom installation or upgrade script, the KS_CUST.CFG kickstart file

Procedure

  1. Download the ESXi ISO image from the Broadcom Support Portal.
  2. Mount the ISO image in a folder:
    mount -o loop VMware-VMvisor-Installer-x.x.x-XXXXXX.x86_64.iso /esxi_cdrom_mount

    XXXXXX is the ESXi build number for the version that you are installing or upgrading to.

  3. Copy the contents of esxi_cdrom to another folder:
    cp -r /esxi_cdrom_mount/* /esxi_cdrom
  4. Copy the kickstart file to /esxi_cdrom.
    cp KS_CUST.CFG /esxi_cdrom
  5. Modify the boot.cfg file in both /esxi_cdrom/efi/boot/boot.cfg (for UEFI boot) and /esxi_cdrom/boot.cfg (for legacy BIOS boot) to specify the location of the installation or upgrade script by using the kernelopt option.
    You must use uppercase characters to provide the path of the script, for example,
    kernelopt=runweasel ks=cdrom:/KS_CUST.CFG
    The installation or upgrade becomes completely automatic, without the need to specify the kickstart file during the installation or upgrade.
  6. Recreate the ISO image using the mkisofs or the genisoimage command.
    Command Syntax
    mkisofs mkisofs -relaxed-filenames -J -R -o custom_esxi.iso -b ISOLINUX.BIN -c BOOT.CAT -no-emul-boot -boot-load-size 4 -boot-info-table -eltorito-alt-boot -eltorito-platform efi -b EFIBOOT.IMG -no-emul-boot /esxi_cdrom
    genisoimage genisoimage -relaxed-filenames -J -R -o custom_esxi.iso -b ISOLINUX.BIN -c BOOT.CAT -no-emul-boot -boot-load-size 4 -boot-info-table -eltorito-alt-boot -e EFIBOOT.IMG -no-emul-boot /esxi_cdrom

    You can use this ISO installer image for regular boot or UEFI secure boot. However, the vSphere Lifecycle Manager cannot verify the checksum of such an ISO image and you cannot use it for upgrades by using vSphere Lifecycle Manager workflows.

Results

The ISO image includes your custom installation or upgrade script.

What to do next

Install ESXi from the ISO image.