In this blog post, I will show you how to configure Auto Deploy in vSphere 7.x. What is vSphere Auto Deploy? vSphere Auto Deploy is a service that is available in vCenter. You can easily provision ESXI hosts in minutes by using vSphere Auto Deploy in combination with PXE boot and Host Profiles.

By default, stateless provisioning will be performed unless you define the statefull option in a Host profile.

Stateless caching: The host will use Auto Deploy to PXE boot a ESXI image and it will cache the image to a local disk, a remote disk, or a USB drive. The cached image will be used when Auto Deploy is unavailable.
Statefull: The host will let Auto Deploy install a ESXI image on the local disk, a remote disk, or a USB drive. The host doesn’t need Auto Deploy anymore to boot. Host Profiles are needed to configure statefull.

Prerequisites

  • DHCP server
  • TFTP server
  • VMware ESXI software image bundle

Enable vSphere Auto Deploy

Let’s start with enabling the vSphere Auto Deploy service in vCenter. To do so, click on the menu and select Auto Deploy

How to configure vSphere 7.x Auto Deploy 2
Open the menu and click on Auto Deploy
How to configure vSphere 7.x Auto Deploy 3
Click on enable auto deploy and image builder to enable those two services.

Import Software Depot

We need to provide the ESXI image to Auto Deploy so that it can be used to provision ESXI hosts. The image can be downloaded from the VMware website.

How to configure vSphere 7.x Auto Deploy 4
Pick the version you want and download the offline bundle.

You can also download an offline bundle from a custom image like HP or Dell.

How to configure vSphere 7.x Auto Deploy 5
Offline bundles for custom images.

Click on the import button to upload the offline bundle to Auto Deploy. Select the offline bundle and click on Upload.

How to configure vSphere 7.x Auto Deploy 6
Select the offline bundle and click on upload.

When the upload has been completed, you will now be able to see the available images from the selected software depot in Auto Deploy.

How to configure vSphere 7.x Auto Deploy 7
There are two images available.

You can also see the available drivers in the selected software depot.

How to configure vSphere 7.x Auto Deploy 8
All the available drivers in the software depot.

Configure TFTP server

There are many different ways to facilitate TFTP, but I chose for the free TFTP software from Solarwinds. This software can be installed on a Windows VM. The installation is straight forward and easy to configure.

Once installed, click on File in the Solarwinds menu and select Configure to check the TFTP server root directory.

How to configure vSphere 7.x Auto Deploy 9
Solarwinds TFTP root directory.

We now need to download the TFTP zip file from the auto deploy view in vCenter. This file can be downloaded from the configure tab in the auto deploy view by clicking on the download TFTP zip file button.

How to configure vSphere 7.x Auto Deploy 10
Download the TFTP zip file.

Once the TFTP zip file has been downloaded, extract the files in the Solarwinds TFTP root directory as shown below.

How to configure vSphere 7.x Auto Deploy 11
Extract the TFTP zip file content in the TFTP root directory.

The content in the TFTP zip file is needed to PXE boot the host and to forward the host to the auto deploy service to retrieve the ESXI image.

Configure DHCP server

A DHCP server is required to have when implementing Auto Deploy. The bare metal server will receive an IP address from the DHCP server and with the additional DHCP scope options, it will receive a gateway, DNS servers, DNS Domain Name, Boot Server Hostname (TFTP server) and the Bootfile Name. It is also required to have DHCP reservations for each ESXI host.

DHCP Scope Options

In my home lab, I have the DHCP service running on my Microsoft domain controller. The following DHCP scope options are configured on my DHCP server.

  • Scope option 003 – Router (Gateway)
  • Scope option 006 – DNS Servers
  • Scope option 015 – DNS Domain Name
  • Scope option 066 – Boot Server Host Name (IP or FQDN of the TFTP server)
  • Scope option 067 – Bootfile Name

Depending on the type of configured BIOS setting on the host, select one of the following files and enter the file name in the Bootfile Name scope option.

BIOS TypeFile Name
BIOSundionly.kpxe.vmw-hardwired
EUFIsnponly64.efi.vmw-hardwired
EUFI + Securebootsnponly64.efi.vmw-hardwired.officialkey
How to configure vSphere 7.x Auto Deploy 12
DHCP reservation and DHCP scope options.

Configure deploy rules

Let’s create a deploy rule in vCenter to provision ESXI hosts with auto deploy. Click on the deploy rule tab and click on new deploy rule.

Enter a name for the deploy rule and specify how you want to apply the rule.
It is possible to apply the rule to all hosts, but you can also add a pattern like shown below.
The deploy rule will only be applied on machines that are having an IP in the IP range: 192.168.15.10-192.158.15.15.

How to configure vSphere 7.x Auto Deploy 13
Enter a name and (optionally) patterns.
How to configure vSphere 7.x Auto Deploy 14
Select Image Profile for the first host.
How to configure vSphere 7.x Auto Deploy 15
Select the Image Profile you would like to use.
How to configure vSphere 7.x Auto Deploy 16
Review and click on finish to continue.
How to configure vSphere 7.x Auto Deploy 17
Deploy rule was successfully created.

The deploy rule has been successfully created, but the state of the rule is Inactive. Select the rule, click on activate/deactivate rules and set the rule to active as shown below.

How to configure vSphere 7.x Auto Deploy 18
Select the rule and click on Activate.

Provision first host with Auto Deploy.

Let’s create a test VM so that we can test the auto deploy service. We have configured DHCP scope option 067 with bootfile name snponly64.efi.vmw-hardwired (EUFI). We need to make sure that our test VM has the correct BIOS settings.

How to configure vSphere 7.x Auto Deploy 19
The test VM is using the portgroup that has been configured with DHCP.
How to configure vSphere 7.x Auto Deploy 20
The firmware has been configured with EFI without secureboot.

Let’s test auto deploy with the test VM we have created. The VM is configured with EFI (without secureboot) and a portgroup that has a subnet with a DHCP scope. We will verify the PXE boot process from the VM console.

How to configure vSphere 7.x Auto Deploy 21
PXE boot process.

On the TFTP server, we can see the communication from the test VM towards the TFTP server. The test VM have downloaded the bootfile and tramp file from the TFTP server..

How to configure vSphere 7.x Auto Deploy 22
Traffic between the test VM and TFTP server occured.
How to configure vSphere 7.x Auto Deploy 23
Test VM is booting ESXI.

After a few minutes, once the test VM booted ESXI successfully, we will see the registration of a stand alone ESXI host in vCenter. Keep in mind that this is a stateless host, so the configuration made on the host is not written on storage but cached.

How to configure vSphere 7.x Auto Deploy 24
The ESXI host has been added to vCenter.

Host profile

All type of configurations like: root password, vmk configuration, vds configuration and much more can be saved in a host profile. A host profile can be applied on a cluster or host to have a consistent configuration. You can provision an ESXI host in a few minutes with vSphere auto deploy and host profile.

Extract host profile

To extract a host profile, select a host (right mouse click) you want to extract, click on host profiles and click on Extract host profile. All the configurations that has been configured on this host will be saved in a host profile.

How to configure vSphere 7.x Auto Deploy 25
Create a host profile based on ESXI host.
How to configure vSphere 7.x Auto Deploy 26
Enter host profile name and click on OK.
How to configure vSphere 7.x Auto Deploy 27
We now have a host profile that contains the information from the first host.

Enable statefull installations

If you would like to have a statefull installation with vSphere auto deploy, you need to enable the statefull installs on the host option in a host profile. You can find this option under Advanced configuration settings –> System Image Cache Configuration. The last thing you need to do is to add the host profile to the deploy rule in auto deploy.

How to configure vSphere 7.x Auto Deploy 28
Enabling statefull installations.