To PXE boot the ESX installer, the DHCP server must send the address of the TFTP server and a pointer to the pxelinux.0 or gpxelinux.0 directory.

The DHCP server is used by the target machine to obtain an IP address. The DHCP server needs to know whether the target machine is allowed to boot and the location of PXELINUX binary (which usually resides on a TFTP server). When the target machine first boots, it broadcasts a packet across the network requesting this information to boot itself. The DHCP server responds.

Caution

VMware does not recommend setting up a new DHCP server if your network already has one. If multiple DHCP servers respond to DHCP requests, machines can obtain incorrect or conflicting IP addresses, or can fail to receive the proper boot information. Talk to a network administrator before setting up a DHCP server.

Many DHCP servers are capable of PXE booting hosts. The following examples are for ISC DHCP versionĀ 3.0, which is included with many Linux distributions. If you are using a version of DHCP for Microsoft Windows, refer to the DHCP server documentation to determine how to pass the next-server and filename arguments to the target machine.

This sample shows how to configure the ISC DHCP server to enable gPXE.

allow booting;
allow bootp;
# gPXE options
option space gpxe;
option gpxe-encap-opts code 175 = encapsulate gpxe;
option gpxe.bus-id code 177 = string
class "pxeclients" {
   match if substring(option vendor-class-identifier, 0, 9) = "PXEClient";
   next-server <TFTP server address>;
   if not exists gpxe.bus-id {
      filename "/gpxelinux.0";
   }
}
subnet <Network address> netmask <Subnet Mask> {
   range <Starting IP Address> <Ending IP Address>;
}

When a machine attempts to PXE boot, the DHCP server provides an IP address and the location of the gpxelinux.0 binary on the TFTP server. The IP address assigned will be in the range defined in the subnet section of the configuration file.

This sample shows how to configure the ISC DHCP server to enable PXELINUX.

#
# DHCP Server Configuration file.
#   see /usr/share/doc/dhcp*/dhcpd.conf.sample
#
ddns-update-style ad-hoc;
allow booting;
allow bootp;
class "pxeclients" {
   match if substring(option vendor-class-identifier, 0, 9) = "PXEClient";
   next-server xxx.xxx.xx.xx;
   filename = "pxelinux.0";
}
subnet 192.168.48.0 netmask 255.255.255.0 {
   range 192.168.48.100 192.168.48.250;
}

When a machine attempts to PXE boot, the DHCP server provides an IP address and the location of the pxelinux.0 binary on the TFTP server. The IP address assigned will be in the range defined in the subnet section of the configuration file.