You can use a Web server to PXE boot the ESXi installer. Because most environments include ESXi hosts that support UEFI boot and hosts that support only legacy BIOS, this topic discusses prerequisites and steps for both types of hosts.
About this task
For legacy BIOS machines, the procedure supports booting multiple different versions of the ESXi installer by using the same pxelinux.0 or gpxelinux.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.
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 configured for PXE booting. See Sample DHCP Configurations.
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 a Web Server:
Verify that the HTTP Web server is accessible by your target ESXi hosts.
(UEFI) Obtain iPXE, available at http://ipxe.org.
(Legacy BIOS) Obtain version 3.86 of the SYSLINUX package, available from https://www.kernel.org/pub/linux/utils/boot/syslinux/.
- Configure the DHCP server for HTTP boot.
- (UEFI only) Obtain and configure iPXE:
- Obtain the iPXE source code, as described at http://ipxe.org/download.
- Follow the instructions on that page, but use the following make command:
- Copy the resulting file snponly.efi to /tftpboot directory on your TFTP server.
- (UEFI only) Copy the file efi/boot/bootx64.efi from the ESXi installer ISO image to /tftpboot/mboot.efi on your TFTP server.
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.
- (Legacy BIOS only) Obtain and configure PXELINUX:
- Obtain SYSLINUX version 3.86, unpack it, and copy the gpxelinux.0 file to the top-level /tftpboot directory on your TFTP server.
- Create a PXELINUX configuration file using the following code model.
ESXi-6.x.x-XXXXXX is the name of the TFTP subdirectory that contains the ESXi installer files.
DEFAULT install NOHALT 1 LABEL install KERNEL ESXi-6.x.x-XXXXXX/mboot.c32 APPEND -c ESXi-6.x.x-XXXXXX/boot.cfg IPAPPEND 2
- Save the PXELINUX file in the /tftpboot/pxelinux.cfg directory on your TFTP server with a filename that will determine whether all hosts boot this installer by default:
Name the file default if you want for all host to boot this ESXi installer by default.
Name the file with the MAC address of the target host machine (01-mac_address_of_target_ESXi_host) if you want only a specific host to boot with this file, for example, 01-23-45-67-89-0a-bc.
- Create a directory on your HTTP server named for the version of ESXi it will hold, for example, /var/www/html/ESXi-6.x.x-XXXXXX.
- Copy the contents of the ESXi installer image to the directory you just created.
- Modify the boot.cfg file
- Add the following line:
http://XXX.XXX.XXX.XXX/ESXi-6.x.x-XXXXXXis the location of the installer files on the HTTP server.
- If the filenames in the
modules=lines begin with a forward slash (/) character, delete that character.
- Add the following line:
- (Optional) For a scripted installation, in the boot.cfg file, add the
kerneloptoption 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.
- (UEFI only) Specify whether you want for all UEFI hosts to boot the same installer.
Copy or link the boot.cfg file to /tftpboot/boot.cfg
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.
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.