We have started our Autodeploy posts in a wrong order. (kind of). Basically, we already explained the initial setup of Autodeploy within vSphere (starting services, initial config) Image Builder management (preparation, image cloning, and management of images). We have also written a post about Autodeploy rules which allows you to create and edit rules (within GUI) which then tell how the stateless host will behave upon booting. Today, however, we have to go back and prepare the DHCP Server for vSphere Auto Deploy Provisioning.
Auto Deploy uses a PXE boot where you have to enter some specific DHCP scope options. We’ll see the details today. vSphere Autodeploy needs also TFTP server, but VCSA 6.5 has already one. A Service just needs to be started.
What do you need?
Here you can see an overview what’s already “baked in” within the VCSA 6.5 which I migrated to. Not only there is vsphere Update manager, but also the Autodeploy TFTP server.
I’ll be demoing it via Windows DHCP and I have one DC which runs the DNS service for my lab. So without further wait, let’s get started.
Prepare the DHCP Server for vSphere Auto Deploy
Step 1 – Create a new DHCP Scope
Connect to your DHCP server and create a DHCP scope for the IP address range which fits your needs. In my environment, I’ll go with the 10.10.7.x network and I’ll be booting a “nested ESXi”. But those could be perfectly fine physical hosts if I had a spare one… -:).
So just go to Administrative Tools and click DHCP > Navigate to DHCP > Hostname > IPv4 > Right-click IPv4 and select New Scope. Specify some meaningful name and description for the scope. Continue to the next page where you’ll chose an IP address range.
Continue with the Exclusion and delay screen by not changing anything > Next > Lease duration (leave default) > Click Next until you reach the Configure DHCP Options screen and select No, I will configure this option later.
Step 2 – Create a new reservation.
What we need to do next is to create and configure a DHCP reservation for each ESXi host that we’ll bee booting. Go to DHCP > hostname > IPv4 > Autodeploy Scope > Reservations. Do a right click > New Reservation.
While there, put some meaningful name, IP address, and the MAC address for one of the hosts you’re booting.
TIP: Do not include the colon (:) in the MAC address.
So you should look like this.
Rinse and repeat for each of the other hosts you wish to use. I stick with only one ESXi for now, but will add more later.
Next, we need to set up the DHCP Server to point the hosts to the TFTP Server. As the TFTP server is already up and running, we don’t have to install it. Remember, in vSphere 6.0 it was an additional process where we had to install a small free TFTP server from Solarwinds.
The only thing we need to do is to connect via SSH to the VCSA 6.5 appliance > open the Shell > and enter a command to start the built-in TFTP server:
service atftpd start
(Note: I haven’t checked if it stays across VCSA 6.5 reboots…..)
Step 3 – Configure DHCP Options
Right-click Scope Options and choose Configure Options > General TAB > Click 066 Boot Server Host and enter the address of the TFTP Server
In the Scope Options window, click the General tab.
Click 066 Boot Server Host Name and enter the address of the TFTP server.
Then configure another option, the one with number 067.
Click 067 Bootfile Name and enter this:
Click apply, OK to close the window.
So this is just a close up image from vCenter server settings (the same as the first image in this post). You can see it when you connect via vSphere client and go to Home > Hosts and Clusters > and Select at the very top the vCenter server > Configure TAB > Autodeploy.
The undionly.kpxe.vmw-hardwired iPXE binary will be used to boot the ESXi hosts.
Step 4 – Activate the DHCP Scope
In the DHCP window, right-click DHCP > hostname > IPv4 > Scope > Activate.
You should not log out from the DHCP Server if you are using Active Directory for DHCP and DNS, or log out otherwise.
Now the vESXi boots up but it has no rules attached to it, so it does not know which image to boot. Let’s quickly create a rule based on an IP pattern…
And this is the rule activated.
and we will see the stateless ESXi host finally booting up….
AutoDeploy, ImageBuilder GUI, DHCP serie:
- vSphere 6.5 Image Builder GUI and AutoDeploy
- VMware vSphere 6.5 and New Image Builder GUI – Cloning a profile – New!!
- VMware vSphere 6.5 AutoDeploy Rules – New!!
- Prepare the DHCP Server for vSphere Auto Deploy Provisioning – VMware vSphere 6.5 – [This Post]
If you want the latest How-to, news, videos ant tutorials for vSphere 6.5, just check the dedicated vSphere 6.5 page.
- VMware vSphere 6.5 Configuration Maximums – New!!
- How to create a USB media with ESXi 6.5 Installation