The ESXi installer must be accessible to the system on which you are installing ESXi.

The following boot media are supported for the ESXi installer:

Format a USB Flash Drive to Boot the ESXi Installation or Upgrade

You can format a USB flash drive to boot the ESXi installation or upgrade.

The instructions in this procedure assume that the USB flash drive is detected as /dev/sdb.

Note: The ks.cfg file that contains the installation script cannot be located on the same USB flash drive that you are using to boot the installation or upgrade. The kickstart file does not have any dependency on BIOS or UEFI boot.

Prerequisites

  • Linux machine with superuser access to it
  • USB flash drive that can be detected by the Linux machine
  • The ESXi ISO image, VMware-VMvisor-Installer-version_number-build_number.x86_64.iso, which includes the isolinux.cfg file

Procedure

  1. Boot Linux, log in, and enter superuser mode by using a su or sudo root command.
  2. If your USB flash drive is not detected as /dev/sdb, or you are not sure how your USB flash drive is detected, determine how it is detected.
    1. Plug in your USB flash drive.
    2. At the command line, run the command for displaying the current log messages.
      tail -f /var/log/messages
      You see several messages that identify the USB flash drive in a format similar to the following message.
      Oct 25 13:25:23 ubuntu kernel: [  712.447080] sd 3:0:0:0: [sdb] Attached SCSI removable disk

      In this example, sdb identifies the USB device. If your device is identified differently, use that identification in place of sdb.

  3. Overwrite the entire USB drive with the ISO image. This overwrites the partition table and any previous content on the USB drive.

    dd bs=10M if=VMware-VMvisor-Installer-version_number-build_number.x86_64.iso of=/dev/sdb

  4. Eject the USB drive.
    eject /dev/sdb

Results

You can use the USB flash drive to boot the ESXi installer.

Create a USB Flash Drive to Store the ESXi Installation Script or Upgrade Script

You can use a USB flash drive to store the ESXi installation script or upgrade script that is used during scripted installation or upgrade of ESXi.

When multiple USB flash drives are present on the installation machine, the installation software searches for the installation or upgrade script on all attached USB flash drives.

The instructions in this procedure assume that the USB flash drive is detected as /dev/sdb.

Note: Do not store the ks file containing the installation or upgrade script on the same USB flash drive that you are using to boot the installation or upgrade.

Prerequisites

  • Linux machine
  • ESXi installation or upgrade script, the ks.cfg kickstart file
  • USB flash drive

Procedure

  1. Attach the USB flash drive to a Linux machine that has access to the installation or upgrade script.
  2. Create a partition table.
    /sbin/fdisk /dev/sdb
    1. Type d to delete partitions until they are all deleted.
    2. Type n to create primary partition 1 that extends over the entire disk.
    3. Type t to set the type to an appropriate setting for the FAT32 file system, such as c.
    4. Type p to print the partition table.
      The result should be similar to the following text:
      Disk /dev/sdb: 2004 MB, 2004877312 bytes
      255 heads, 63 sectors/track, 243 cylinders
      Units = cylinders of 16065 * 512 = 8225280 bytes
         Device Boot      Start         End      Blocks   Id  System
      /dev/sdb1             1           243      1951866  c   W95 FAT32 (LBA)
      
    5. Type w to write the partition table and quit.
  3. Format the USB flash drive with the FAT32 file system.
    /sbin/mkfs.vfat -F 32 -n USB /dev/sdb1
  4. Create a destination directory and mount the USB flash drive to it.
    mkdir -p /usbdisk
    mount /dev/sdb1 /usbdisk
  5. Copy the ESXi installation script to the USB flash drive.
    cp ks.cfg /usbdisk
  6. Unmount the USB flash drive.
    umount /usbdisk

Results

The USB flash drive contains the installation or upgrade script for ESXi.

What to do next

When you boot the ESXi installer, point to the location of the USB flash drive for the installation or upgrade script. See Enter Boot Options to Run an Installation or Upgrade Script and PXELINUX Configuration Files.

Create an Installer ISO Image with a Custom Installation or Upgrade Script

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 Installing ESXi by Using a Script 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 VMware Customer Connect.
  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.