- Install the Auto Deploy Server
- Utilize Auto Deploy cmdlets to deploy ESXi hosts
- Configure Bulk Licensing
- Provision/Re-provision ESXi hosts using Auto Deploy
- Configure an Auto Deploy reference host
To start with, the official and some other useful documentation on this objective:
- vSphere Installation and Setup Guide, Chapter 5
- vSphere 5.0 Evaluation Guide Volume 4 – Auto Deploy
- vSphere 5.0 Evaluation Guide Volume 1, section on Image Builder, page 91.
- Understanding vSphere Auto Deploy
- Video vSphere Auto Deploy Demo
- Good reading on Auto Deploy Rules and Rule Sets by Joe Keegan (thanks Joe!).
- VMware Blogs Using the vSphere ESXi image Builder CLI by Kyle Gleed.
Probably useful, but not in the official Curriculum:
- vSphere Auto Deploy Gui 5.0
A few words on this Objective. Imho Auto Deploy is a though subject you cannot learn by reading manuals, tutorials and blog posts. You should really play a lot in a home lab or test environment to get a good understanding on the architecture of Auto Deploy and the components. The vSphere Installation and Setup Guide presents a lot of information, but is a bit overwhelming. In my case, I have followed these steps:
- I have Prepared my home lab for Auto Deploy. I have watched Trainsignal vSphere 5 Training, lesson 28 on this subject. Also this post “Using vSphere 5 Auto Deploy in your home lab” by Duncan Epping was very useful.
- In a small home lab you will practice by using nested ESXi servers, read this post by Eric Gray, or this post by Vladan Seget.
- The vSphere 5.0 Evaluation Guide Volume 4 – Auto Deploy was also very useful for a good understanding on how to set up Deploy Rules. In this guide the three Deploy Rules (Image Profile Rule, vCenter Folder/Cluster Rule and Host Profile Rule) are being used.
- Get familiar with the commands presented in the Get-DeployCommand. Joe Keegan’s post helped me lot understanding the Deploy Rules
- The vSphere 5.0 Evaluation Guide Volume 1, has a nice introduction on the Image Builder. A useful exercise is trying to upgrade the Image Profile (for that reason I have started with a rather old one)
- The last step so far is reading Chapter 5 in the vSphere Installation and Setup Guide to glue everything together.
Install the Auto Deploy Server
vSphere Installation and Setup Guide , Chapter 5, “Installing ESXi using vSphere Auto Deploy”, Section “Preparing for vSphere Auto Deploy”, page 74.
There are three ways to install the Auto Deploy Server:
- You can install the Auto Deploy Server on the vCenter Server;
- You can install the Auto Deploy Server on a separate Windows based server;
- If you use the vCenter Server Appliance, Auto Deploy is included on the appliance by default.
Note: combinations of a vCenter Server and Auto Deploy Server on Windows and the appliance are possible.
The vSphere Installation and Setup Guide has a section on how to install Auto Deploy on the Windows vCenter Server or on a separate Windows host. When installed on a separate server, Auto Deploy supports identical hardware and OS as the vCenter Server.
During the install you will have to make a few decisions on:
- Location of the Auto Deploy repository
- The max. size of the repository
- The Auto Deploy server port, 6501 by default
On the vCenter Server Appliance, the Auto Deploy server is disabled by default. To enable perform the following steps (vCenter Server Host Management Guide):
- Log in to the VMware vCenter Server Appliance web console.
- On the Services tab, select Autodeploy.
- Type the Autodeploy Server Port to use.
- In the Autodeploy repository max size field, type the maximum Auto Deploy repository size in GB.
- (Optional) Click Test Settings to verify that the specified settings are valid.
- Click Save Settings.
- Restart ESXi services.
Installing the Auto Deploy server is not the only part. See the section “Preparing for vSphere Auto Deploy”, at least you need to set up/modify:
- a DHCP server and create Reservations;
- a DNS server and create Host and PTR records;
- a TFTP server and extract the TFTP Boot Zip file;
- install vSphere PowerCLI.
- VMware KB 2000988 “Troubleshooting vSphere Auto Deploy”
Utilize Auto Deploy cmdlets to deploy ESXi hosts
vSphere Installation and Setup Guide , Chapter 5, “Installing ESXi using vSphere Auto Deploy”, Section “Auto Deploy PowerCLI Cmdlet Overview”, page 71.
In fact, there are two groups of Cmdlets related to Auto Deploy:
- Cmdlets related to Auto Deploy;
- Cmdlets related to Image Builder, see Objective 9.1.
The Cmdlets related to Auto Deploy are displayed by the command:
The steps to deploy an ESXi host, using these Cmdlets are carefully outlined in the The vSphere 5.0 Evaluation Guide Volume 4 – Auto Deploy, page 14 – 22.
Make sure you understand these key concepts:
- The difference between the Get-DeployRule and Get-DeployRuleSet Cmdlet.
- The difference between the Active RuleSet and the Working RuleSet.
- The concept of “Pattern matching”, used in the New-DeployRule command.
I highly recommend reading this post by Joe Keegan.
Configure Bulk Licensing
vSphere Installation and Setup Guide , Chapter 5, “Installing ESXi using vSphere Auto Deploy”, Section “Set Up Bulk Licensing”, page 77.
There are two ways to set up licensing, you can use the vSphere Client or ESXi Shell to specify individual license keys, or you can set up bulk licensing by using PowerCLI cmdlets. Bulk licensing works for all ESXi hosts, but is especially useful for hosts provisioned with Auto Deploy.
The whole process is carefully outlined in the official documentation, two prerequisites:
- A VMware vSphere Enterprise Plus License key, in case you use Auto Deploy and Host Profiles;
- You need to decide on which Datacenter, Cluster or Folder you want to enable bulk licensing.
Provision/Re-provision ESXi hosts using Auto Deploy
vSphere Installation and Setup Guide , Chapter 5, “Installing ESXi using vSphere Auto Deploy”, Section “Provisioning ESXi Systems with vSphere Auto Deploy”, page 82.
There is a difference between:
- Provision a Host for First Boot;
- Reprovisioning Hosts (subsequent reboots).
To Provision a Host for First Boot, you have to some preparation and one-time actions during the first boot:
- your host meets the hardware requirements for ESXi hosts;
- Prepare you Auto Deploy System (DHCP reservation, DNS entries, Image Profile etc.;
- Check and/or adjust the DeployRuleSet
- When using Host Profiles, after successful booting the ESXi host, check the Answer file.
Reprovisioning Hosts, Auto Deploy supports multiple options, like:
- Simple reboot.
- Reprovision with a different image profile.
- Reprovision with a different host profile.
- Reprovision with a different vCenter location (does not work over Datacenters…)
To Reprovision an ESXi host with a different image profile, you have to follow this procedure:
- Edit the Deploy Rule that applies the Image Profile:
PowerCLI> Copy-DeployRule <Assign Image Rule> -ReplaceItem <New Image Profile>
- Important, for each ESXi host, you must repair rule compliance:
PowerCLI> Test-DeployRuleSetCompliance <ESXi host> | Repair-DeployRuleSetCompliance
- Alternatively, the Apply-ESXImageProfile Cmdlet does the same job.
Configure an Auto Deploy reference host
vSphere Installation and Setup Guide , Chapter 5, “Installing ESXi using vSphere Auto Deploy”, Section “Setting up an Auto Deploy Reference Host”, page 85.
In an environment where no state is stored on the host, a reference host helps you set up multiple hosts with the same configuration. You configure the reference host with the logging, coredump, and other settings that you want, save the host profile, and write a rule that applies the host profile to other hosts as needed.
The setup depends on your needs and organization. Pay attention to the following subjects:
- Network configuration;
- Storage configuration;
- Time services NTP, especially important for log files!
- Syslog configuration, see Objective 6.1;
- Install and Configure ESXi Dump Collector, see also Objective 6.1.
- Security Setup, e.g. unified user access by setting up Microsoft Active Directory, see Objective 7.1