You can use iPXE to boot the ESXi installer from an HTTP server.

  • For legacy BIOS machines, the procedure supports booting multiple different versions of the ESXi installer by using the same pxelinux.0 initial boot loader for all target machines, but potentially different PXELINUX configuration files depending on the target machine's MAC address.
  • For UEFI machines, the procedure supports booting multiple different versions of the ESXi installer by using the same mboot.efi initial boot loader for all target machines, but potentially different boot.cfg files depending on the target machine's MAC address.

Prerequisites

The prerequisites and steps depend on the support of UEFI boot or legacy BIOS only. You can use iPXE to boot the ESXi installer from an HTTP server. The following topic discusses prerequisites and steps for ESXi hosts that support UEFI boot and hosts that support legacy BIOS only.

Verify that your environment has the following components:

  • ESXi installer ISO image, downloaded from the VMware Web site.
  • Target host with a hardware configuration that is supported for your version of ESXi. See the VMware Compatibility Guide.
  • Network adapter with PXE support on the target ESXi host.
  • DHCP server that you can configure for PXE booting. See Sample DHCP Configurations.
  • TFTP server.
  • Network security policies to allow TFTP traffic (UDP port 69).
  • For legacy BIOS, you can use only IPv4 networking. For UEFI PXE boot, you can use IPv4 or IPv6 networking.
  • (Optional) Installation script (kickstart file).
  • Use a native VLAN in most cases. If you want to specify the VLAN ID to be used with PXE booting, check that your NIC supports VLAN ID specification.
Verify that your environment also meets the following prerequisites required for PXE boot using an HTTP Server:
  • Verify that the HTTP server is accessible by your target ESXi hosts.
  • If your ESXi host runs legacy BIOS firmware only, obtain version 3.86 of the SYSLINUX package. For more information, see Network Boot Background Information.

Procedure

  1. Obtain and configure iPXE.
    1. Obtain the iPXE source code.
    2. On the iPXE download page, follow the build instructions, but run one of the following commands.
      • For ESXi hosts that run legacy BIOS firmware only, run make bin/undionly.kpxe.
      • For ESXi hosts that run UEFI firmware, run make bin-x86_64-efi/snponly.efi.
    3. Copy the undionly.kpxe or snponly.efi file to the /tftpboot directory on your TFTP server.
  2. If your ESXi host runs legacy BIOS firmware only, obtain and configure PXELINUX.
    1. Obtain SYSLINUX version 3.86, unpack it, and copy the pxelinux.0 file to the /tftpboot directory on your TFTP server.
    2. Create a PXELINUX configuration file using the following code model.
      ESXi-8.x.x-XXXXXX is the name of the TFTP subdirectory that contains the ESXi installer files.
      DEFAULT install
      NOHALT 1
      LABEL install
        KERNEL ESXi-8.x.x-XXXXXX/mboot.c32
        APPEND -c ESXi-8.x.x-XXXXXX/boot.cfg
        IPAPPEND 2
      
    3. Save the PXELINUX file in the /tftpboot/pxelinux.cfg directory on your TFTP server.
      The filename determines whether all hosts boot this installer by default.
      Option Description
      Same installer Name the file default if you want all host to boot this ESXi installer by default.
      Different installers Name the file with the MAC address of the target host machine (01-mac_address_of_target_ESXi_host), if only a specific host must boot this file. For example, 01-23-45-67-89-0a-bc.
  3. If your ESXi host runs UEFI firmware, copy the efi/boot/bootx64.efi file from the ESXi installer ISO image to the /tftpboot folder on your TFTP server, and rename the file to mboot.efi.
    Note: Newer versions of mboot.efi can generally boot older versions of ESXi, but older versions of mboot.efi might be unable to boot newer versions of ESXi. If you plan to configure different hosts to boot different versions of the ESXi installer, use the mboot.efi from the newest version.
  4. Configure the DHCP server.
  5. Create a directory on your HTTP server with the same name as the version of ESXi it will hold. For example, /var/www/html/ESXi-8.x.x-XXXXXX.
  6. Copy the contents of the ESXi installer image to the newly created directory.
  7. Modify the boot.cfg file
    1. Add the following line:
      prefix=http://XXX.XXX.XXX.XXX/ESXi-8.x.x-XXXXXX
      where http://XXX.XXX.XXX.XXX/ESXi-8.x.x-XXXXXX is the location of the installer files on the HTTP server.
    2. If the filenames in the kernel= and modules= lines begin with a forward slash (/) character, delete that character.
    3. If the kernelopt= line contains the string cdromBoot, remove the string only.
  8. (Optional) For a scripted installation, in the boot.cfg file, add the kernelopt option to the line after the kernel command, to specify the location of the installation script.
    Use the following code as a model, where XXX.XXX.XXX.XXX is the IP address of the server where the installation script resides, and esxi_ksFiles is the directory that contains the ks.cfg file.
    kernelopt=ks=http://XXX.XXX.XXX.XXX/esxi_ksFiles/ks.cfg
  9. If your ESXi host runs UEFI firmware, specify whether you want all UEFI hosts to boot the same installer.
    Option Description
    Same installer Copy or link the boot.cfg file to /tftpboot/boot.cfg
    Different installers
    1. Create a subdirectory of /tftpboot named after the MAC address of the target host machine (01-mac_address_of_target_ESXi_host), for example, 01-23-45-67-89-0a-bc.
    2. Place a copy of (or a link to) the host's boot.cfg file in that directory, for example, /tftpboot/01-23-45-67-89-0a-bc/boot.cfg.