In today’s topic we will take a look at Autodeploy – VCP6-DCV Objective 8.1 – Deploy ESXi Hosts Using Autodeploy, which is quite large topic. Autodeploy allows provision dozens (or hundreds) physical hosts with ESXi images. It’s possible to manage large deployments where hosts are booted via network from a central Auto-deploy server. In conjunction with host profiles it’s possible to attach hosts to clusters and push a different configurations depending on parameters like hardware vendor.
Identify ESXi Autodeploy requirements
There are some requirements but at the same time that there are also limitations, so make sure that any of those limits does not actually puts a brake on your project. Before you can start to use vSphere Auto Deploy, you must prepare your environment. You start with server setup and hardware preparation. You must register the Auto Deploy software with the vCenter Server system that you plan to use for managing the hosts you provision, and also install the VMware PowerCLI on a management station (or Windows based vCenter server).
- Hardware requirements for ESXi 6.0 – check here.
- ESXi hardware must be set to use BIOS (EFI isn’t supported)
- Require Ports opened between vCenter server and ESXi hosts – check here
- If VLANs used, then check that works properly.
- Minimum Storage – 2Gb of storage for storing ESXi images, where each of those images requires about 350Mb. So depending of how many profiles you will use by taking that number into consideration.
- Autodeploy server must use IPv4 – The PXE boot infra does not support IPv6.
- Install ESXi Dump colletor – this will allow
Thanks to Simplivity you can download this VCP6-DCV Study Guide as a Free PDF !!
You must first enable the service. Go to vSphere Web Client > System Configuration > Services > Select Autodeploy > Actions > Edit Startup Type
This will prompt you for the service settings:
And then make sure that you start the service!
On the vCenter Server Appliance, the Auto Deploy service by default is set to Manual (on Windows it’s Disabled). If you want the Auto Deploy service to start automatically upon OS startup, select Automatic.
In a vSphere Web Client > Inventory list > select the vCenter Server > Manage tab > Settings > Auto Deploy.
Then click the Download TFTP Boot Zip to download the TFTP configuration file and unzip the file to the directory in which your TFTP server stores files.
Install TFTP server (I usually use the Free TFTP server from Solarwinds). The installer creates a default directory which can be changed. I changed mine to c:tftp to keep it simple. You can configure the option by going to File > Configure menu. While there, make sure that you start the service. (Note: you can also go to Windows services to make the TFTP service start automatically during the boot as by default it has manual start only).
That’s it for TFTP server. There is nothing else to play with and we can move on.
DHCP Server Options
Next I’ll show you the options you need to configure on your DHCP server. There are just two options which needs to be configured at the scope level. When you click on the Autodeploy icon in vSphere client, you’ll end up on this page where you can see some strange name of file. But this exact name will be needed for setting up options in our DHCP server! It’s the.
So next step is to click and download the TFTP boot zip files to the c:tftp directory that we created and set up on our TFTP server. Unzip the file into the same directory You should have a view like this:
Once done, we can copy this name of the file () as an option 67 in our DHCP server. In my case I have Windows DHCP server which sits on my domain controller.
Now you should configure each of your ESXi host’s BIOS to boot from network.
Explain PowerCLI cmdlets for Autodeploy
Auto Deploy uses a PXE boot infrastructure in together with vSphere host profiles to provision and customize host(s). No state is stored on the host(s) itself. But rather, the Auto Deploy server manages state information for each host.
Autodeploy server has the informations about the location of image profile and host profiles and this information is specified in the rules that map machines to image profiles and host profile. Whe host boots up from the first time it’s vCenter server who creates a host objects and stores the information in the vCenter DB.
The whole architecture:
Auto Deploy CMDLETs
There are many more auto deploy cmdlets than the ones I’m using in this post, so here is the full list for reference:
|Get-DeployCommand||Gives you a list of Auto Deploy cmdlets.|
|New-DeployRule||Creates a new rule with the specified items and patterns|
|Set-DeployRule||Updates an existing rule with the specified items and patterns. Rules that belong to a working ruleset can not be updated.|
|Get-DeployRule||Retrieves rules as specified by an administrator.|
|Copy-DeployRule||Clones and updates an existing rule.|
|Add-DeployRule||Adds one or more rules to the working and active ruleset(s). The NoActivate parameter can be specified to add a rule only to the working ruleset.|
|Remove-DeployRule||Removes one or more rules from the working and active rule set. The rule(s) can be deleted by using the -Delete parameter.|
|Set-DeployRuleSet||Explicitly sets the list of rules in the working rule set.|
|Get-DeployRuleSet||Retrieves the current working rule set or active rule set.|
|Switch-ActiveDeployRuleSet||Activates a rule set so that any new requests are evaluated through the rule set.|
|Get-VMHostMatchingValues||Retrieves rules matching a pattern. For example, all rules that apply to hosts can be retrieved.|
|Test-DeployRulesetCompliance||Checks whether items associated with a specified host are in compliance with an active rule set.|
|Repair-DeployRuleSetCompliance||Updates the image profile, host profile and location for each host in the vCenter Server inventory based on the results of Test-DeployRulesetCompliance.|
|Apply-EsxImageProfile||Associates the specified image profile with the specified host.|
|Get-VMHostImageProfile||Retrieves the image profile in use by a specified host.|
|Repair-DeployImageCache||Command can be used if the image cache is accidentally deleted.|
|Get-VMHostAttributes||Returns attributes for a host that are used when the Auto Deploy server evaluates the rules.|
Stateless caching – Autodeploy does not store ESXi configuration or state on the host disk by default. Rather an image profile defines the image that the host is provisioned with, and other host attributes are managed through host profiles. A host that uses Auto Deploy for stateless caching has to have an access to Autodeploy server and vCenter server. That’s why the vCenter server has to be UP in order to be able to provission those hosts (SPOF???).
Stateful installs – In this case it is possible to provision a host with Auto Deploy and set up the host to store the image to disk. On subsequent boots, the host boots from disk
Deploy/Manage multiple ESXi hosts using Autodeploy
1. Install PowerCLI
2. Use the PowerCLI cmdlets to define rule which assigns an image profile and host profile (optional) to the host.
3. Configure reference host and create a host profile where you’ll keep what’s common for all hosts (storage, networking and other). Write a rule that assigns not only the already tested image profile but also the host profile to the target host.
4. If you need manual information to be entered, you can specify user input in the customization of the host within the vSphere web client.
Getting Help with PowerCLI commandlets
- Basic help: Get-Help cmdlet_name
- Detailed help: Get-Help cmdlet_name -Detailed
I have done a blog post serie covering host profiles, autodeploy…when learning towards VCAP exam. You can use it as a guide for preparation for the VCP exam as most things hasn’t changed…
- VCAP Diary – VMware vSphere ESXi Image Builder
- VMware vSphere AutoDeploy – Run some PowerCLI and you’re the Boss
- VMware vSphere AutoDeploy – Install and configure
- VCAP Diary – VMware vSphere Host Profiles
- VMware vSphere Host Profiles – options and troubleshooting
VMware documentation and Tools
- vSphere Installation and Setup Guide
- vSphere Client / vSphere Web Client
- Direct Console User Interface (DCUI)
Some more links: