Copyright © 2013-2017 by "Payman"  ·  All Rights reserved  ·  E-Mail:
Tel: +98-912-3098599
Suite 101, 1220 West Market Street
Wilmington, Delaware  U.S.A. 19901
Tel: 1-302-123-7777

Configure Auto Deploy Installation

Auto Deploy in vSphere 6.5 can be done via Commands, and Web GUI as well. We will start with
the configuration of Auto Deploy in Command Line.  Auto Deploy service must be started after
deploying vCenter server.
We can use the appliance in our lab; to check the status, we open the Web Client - System
Configuration - Services - Auto Deploy
The service is stopped and set to manual by default. Change it to Automatic.
To start the service on the appliance directly run the following:

>service vmware-rbd-watchdog start

Now if you browse to Web Client - vCenter Inventory List - vCenter Servers - vCenter -
Manage - Settings - Auto Deploy, you can see the service running with some settings.

From the same screen you need to download the TFTP package. One of the requirements for Auto
Deploy is using a TFTP server.  In our lab we are using WinAgents TFTP server.  We install this on
a VM and create a directory for it to use, C:\TFTP.  When downloading the TFTP package from the
Web Client, we must download and extract it to this directory.

Another requirement is a DHCP server. First, we setup a DHCP service on the same Windows
server as TFTP server. Open the DHCP server and change the scope options 066 and 067.
Option 066 requires the IP address of the TFTP server and option 067 requires the boot filename,
Now if you set a host on the network to PXE boot, you can see the host picking up an IP address
from DHCP server and talking to the TFTP server; but we don’t have an ESXi image.

The next step is to install PowerCLI on our management machine. There are some requirements
for PowerCLI which you can check documents. PowerCLI comes with built in Auto Deploy cmdlets
so nothing needs adding at this point.  Run a quick Get-Deploy command to see the available
First, we need to upload an ESXi image. Download an depot version of ESXi from the VMware
portal. Connect to vCenter server with an account with the administrator permissions.

>Connect-VIserver vCenter_FQDN

Add the offline ESXi image:

>Add-EsxSoftwareDepot “c:\VMware-ESXi-6.5.0-4564106-depot“

Check that the upload was successful:


We now need to create a rule set and associate a host profile for the Auto Deploy. Hosts deployed
via Auto Deploy can be with either stateful deployment or stateless. Stateful deployments,
provisions a host and applies a Host Profile to store the ESXi image and configure to local disk or
USB. Once installed, the host will boot from disk and no longer require Auto Deploy.
Stateless deployment provisions a host using Auto Deploy and applies a Host Profile; and every
boot requires Auto Deploy. Caching can be configured to allow the host to boot from a cached
image, if Auto Deploy be unavailable.
To enable stateful or stateless, a Host Profile must be configured. Create a Host Profile with name
HP-Autodeploy and edit it via Web Client - Host Profiles - Edit - Advanced Configuration
Settings - System Image Cache Configuration.
You can uncheck all other parameters for this time.
Now we have Auto Deploy configured and a Offline ESXi image has been uploaded, we need to
create a deployment rule.  we need to start PowerCLI and connect to the vCenter.

>Connect-VIserver vCenter_FQDN

As part of the deployment plan it is possible to add the host direct into vCenter after ESXi is
installed, this can be an object such as a datacenter, cluster or folder.  We create a datacenter
called DC-Lab.
Once created, we run the following commands. We specify the uploaded ESXi image, Host Profile
and folder using -Item and specify the IP address of the host using -Pattern in separate rules. The
pattern can be a range of IP address, MAC address and vendor.

>New-DeployRule -Name “Assign-Image” -Item “ESXi-6.5.0-4564106-standard” -Pattern

>New-DeployRule -Name “Assign-Profile” -Item “HP-Autodeploy” -Pattern “ipv4=”

>New-DeployRule -Name “Assign-Cluster” -Item “DC-Lab” -Pattern “ipv4=”

We then need to apply rules to make it the active rule set

>Add-DeployRule -DeployRule “Assign-Image”
>Add-DeployRule -DeployRule “Assign-Profile”
>Add-DeployRule -DeployRule “Assign-Cluster”

Now if we boot a new machine with PXE, it will pick up a IP address and the TFTP details from the
DHCP server. The host will then match the deployment rule and the uploaded ESXi image is
deployed and added to the datacenter DC-Lab in vCenter server.
To edit a deployment rule, we first run to find the rule we want to change


If you want to change an item, you can run the following command; we are changing the location
DC-Lab to a new cluster object called Deployment:

>Copy-DeployRule -DeployRule name_of_rule -ReplaceItem “Deployment”

To view the details of a host, you can run the following command:

>Get-VMHost -nameofhost |fl

Next, we can create and associate Host Profiles for an Auto Deploy reference host. A reference
host can be configured with network settings, NTP settings, Syslog settings, Core Dump setup and
Security settings.  This reference host can provide a Host Profile to be applied to Auto Deploy
stateless deployments.
Set up a host using the usual methods (Web Client or CLI) and use that host to create a Host
Profile that will be used as the reference.  It is possible to create the Host Profile manually.

A Land of Virtualization Technology