Configure DHCP and TFTP for Auto Deploy

In the previous post, we covered Enabling Auto Deploy on vCenter Server Appliance 6.

There are several more steps that need to be taken to get Auto Deploy configured correctly.

In this post we discuss the next step in our journey to running Auto Deploy in your environment, which is configuring your DHCP server.

Upcoming blog posts will discuss:

  • Adding a software depot, creating deployment rules, and activating rulesets
  • Creating and Applying Host Profiles

Understanding How Hosts Boot

For Auto Deploy to work correctly there are a few things that need to be configured in your environment. Primarily DHCP and TFTP. DHCP will assign an IP address to the hosts that are booting up, once the IP Address is assigned, the host will initiate and iPXE boot. The iPXE boot utilizes TFTP to transfer the ESX image to the host, which is then loaded into RAM and booted.


As mentioned previously, you will need a DHCP scope that will hand out an IP to each ESX host as it boots. To setup your DHCP server, add the DHCP feature to your server:

In Server Manager, Select DHCP, Right-click on the DHCP Server name, then select DHCP Manager.

Screenshot 2015-04-07 12.51.30

Right-click ‘IPv4’ and select ‘New Scope

Screenshot 2015-04-07 12.52.30

The New Scope Wizard appears. Select ‘Next’.

Screenshot 2015-04-07 12.52.47

Give your scope a name and a description, click ‘Next

Screenshot 2015-04-07 12.53.03

Next, you will create the IP range associated with the DHCP scope (Which IP addresses will be given out when a DHCP request has been made). Set the network configuration either by entering the length or the mask. Click ‘Next

Screenshot 2015-04-07 12.53.23

Additionally, if there are any IP addresses within the set range that need to be excluded, they can be added here. click ‘Next

Screenshot 2015-04-07 12.54.11

You will then set the Lease Duration. When determining the lease duration, realize that you will most likely be applying Host Profiles to the host once it has booted ESXi. The IP address offered by the DHCP server is only used until the host profile is applied. This may be only a few minutes, you may choose to set the lease to several hours. In this example, I’ve set my DHCP lease to 8 minutes (quite short, but suitable for the lab). Click ‘Next’.

Screenshot 2015-04-07 12.54.31

The last page of the wizard asks if you want to configure additional options. You may do so, but it it not necessary. Select ‘No’, Click ‘Next’.

Screenshot 2015-04-07 12.54.47

The wizard is complete, click ‘Finish’.

Screenshot 2015-04-07 12.54.50

Now that the DHCP scope has been defined, It’s time to set several scope options that are needed for Auto Deploy to work. Expand your scope, Select ‘Scope Options’. You will need to enable both 066 – Boot Server Host Name and 067 – Bootfile Name.  When selecting option 066, You’ll need to insert the hostname or IP address of the server running TFTP. In this case, my DHCP server is also running TFTP, so the IP address of the DHCP server was used.

Screenshot 2015-04-07 12.56.00

Enable 067Bootfile Name. Here you will need to use the ‘BIOS DHCP File Name’  found in the Auto Deploy settings of your vCenter Server (see two images down). Generally, the filename is “undionly.kpxe.vmw-hardwired

Screenshot 2015-04-07 12.56.25

These settings can be found when navigating the vSphere Web Client > vCenter Servers > (Your vCenter) > Manage > Settings > Auto Deploy.

Screenshot 2015-04-07 14.36.22

That is it from the DHCP server standpoint. You will now need to configure your TFTP settings


Trivial File-Transfer Protocol (TFTP) is used to transfer the boot files to the Auto Deploy host during iPXE boot. If you do not have a TFTP program, there are a number of options to choose from. In this example, I use the SolarWinds TFTP Server. Once installed, Click on the TFTP Server application, Click ‘File’ and select ‘Configure’. Here, I’ve created a folder ‘TFTP-Root’ for the Root directory.

Screenshot 2015-04-07 15.23.36

Going back to the last image in the DHCP section, Click ‘Download TFTP Boot Zip’ to download the necessary files that will be placed in the TFTP Server Root Directory. Unzip the files, and paste them in the desired location. Your directory will look similar to the image below:

Screenshot 2015-04-07 15.26.56

Start the TFTP Service and click ‘OK’ to exit the TFTP Settings window. You are now ready to boot up a server and proceed with the PowerCLI portion of Auto Deploy: (Adding a software depot, creating deployment rules, and activating rulesets), which will be the topic of my upcoming blog post, next week.