vSphere Auto Deploy – Host Profiles and Answer Files

As part of my VCAP5-DCA study yesterday I walked through the process of creating an Image Profile and Booting an ESXi host using VMware Auto Deploy. The new Auto Deployed ESXi host is up and running but now configurations need to be applied to add the necessary network settings, storage configurations, and other settings so the host can become a functioning part of the virtual infrastructure. These configuration applied by using Host Profiles and Answer Files.

Configure the new Host

When the new Auto Deployed host finishes booting it will be added to vCenter inventory as a standalone host. Place the host maintenance mode and configure the host network, storage, NTP, DNS, hostname, syslog server, and any other options necessary for normal operation as you would an ESXi host built from a CD. Do not add the host to a DRS or HA cluster. Once the host configuration is complete a new Host Profile needs to be created from the host.

Creating a Host Profile

In Home -> Management -> Host Profiles choose “Create Profile” and select the new Auto Deploy host as the Reference Host. I named my new Host Profile AutoDeploy.

To add the root password to the Host Profile edit the new profile and browse to Security Configuration -> Administrator password. Select Configure a fixed administrator password in the drop down and type your ESXi root password twice. Click OK to update the Profile.

Update the Host Answer File

The Host Answer File contains host specific information such as hostname, ip addresses, etc. Once the new Host Profile is created attach the Auto Deployed host to the profile. The right click on the host and select “Check Answer File”. The Answer File Status should show Incomplete. Right click on the host again and select “Update Answer File”.

Verify and update all the configuration information in the Answer File. The Answer File Status should now show complete. Select the host and “Check Compliance”. The new Auto Deployed host should be Compliant and the Answer File should be Complete.

Add vmware-fdm to the Image Profile

If the host is going to be part of an HA cluster the vmware-fdm software package needs to be added to the image profile.

First clone the standard image profile.

New-ESXImageProfile -CloneProfile ESXi-5.0.0-20111104001-standard -Name ESXiHAProduction

Add the vmware-fdm software package to the new Image Profile.

Add-ESXSoftwareDepot -DepotUrl http://vcenteripaddress:80/vSphere-HA-depot
Add-ESXSoftwarePackage -ImageProfile ESXiHAProduction -SoftwarePackage vmware-fdm

Delete the Deploy Rule used for the first boot.

Remove-DeployRule -DeployRule ESXiDeployProfile -delete

Create a new Deploy Rule with the new Image Profile, the Host Profile, and the Cluster where the Host will be added. ESXiHAProduction is my Image Profile, DCA is my cluster, AutoDeploy is the Host Profile name that will be applied. Then activate the new Deploy Rule

New-DeployRule -Name ESXiHADeploy -Item ESXiHAProduction,DCA,AutoDeploy -Pattern “ipv4=”
Add-DeployRule ESXiHADeploy

Name        : ESXiHADeploy
PatternList : {ipv4=}
ItemList    : {ESXiHAProduction, DCA, AutoDeploy}

Reboot the Host

Now reboot the Auto Deployed host. When the host reboots it will be added to vCenter inventory in the DCA cluster. The AutoDeploy profile and the host’s Answer File will be applied.

That’s One! Now What?

Other host that match the pattern (ipv4= that boot using the ESXiHADeploy Deploy Rule will boot with the ESXiHAProduction Image Profile and will be attached to the AutoDeploy Host Profile but the profile will not be applied since an Answer File has not been created for the host. Because of this the new host will also remain in maintenance mode.

Go to Home -> Management -> Host Profiles and right click on the new Auto Deploy host and Update the Answer File. Add the missing information (IP addresses, hostname, etc) and click update.

Reboot the host, it will load the Image Profile, the Host Profile and Answer File will be applied, and it will exit maintenance mode as part of the cluster defined in the Deploy Rule.

One thought on “vSphere Auto Deploy – Host Profiles and Answer Files

Leave a Reply

Your email address will not be published. Required fields are marked *

one × two =