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.
Right-click ‘IPv4’ and select ‘New Scope’
The New Scope Wizard appears. Select ‘Next’.
Give your scope a name and a description, click ‘Next’
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’
Additionally, if there are any IP addresses within the set range that need to be excluded, they can be added here. click ‘Next’
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’.
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’.
The wizard is complete, click ‘Finish’.
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.
Enable 067 – Bootfile 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”
These settings can be found when navigating the vSphere Web Client > vCenter Servers > (Your vCenter) > Manage > Settings > Auto Deploy.
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.
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:
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.