vSphere 5 Video Series – VMware vSphere 5.0 Auto Deploy

Happy Holidays! This video is a continuation of my vSphere 5 Video Series, in this video I cover how to properly leverage VMware vSphere 5.0 Auto Deploy to automatically deploy ESXi hosts in your infrastructure. Auto Deploy is a new feature found in the Enterprise Plus edition of vSphere 5, it allows administrators to deploy stateless images that are deployed via gPXE directly to the RAM of the host. That’s right, ESXi hosts do not require a local HDD/USB/SDCARD to operate as they can simply download their image and configuration (via Host Profile) into RAM and automatically be placed in their correct vCenter Server datacenter/cluster or folder.

As shown above, PowerCLI is used to create an ESXi Image Profile, this image includes the base ESXi installation as well as any additional drivers, third-party integration or plug-in that you would like to include. That Image Profile is then attached to a Deployment Rule that is also created within PowerCLI. The deployment rule dictates what Image Profile is to be used, what host(s) are tied to the deployment rule and some other configuration specifics such as, which Host Profile to attach after the host has been added to vCenter as well as which vCenter DC/Cluster/Folder to add the host to. For example, you can leverage the same Image Profile but have different Deployment Rules based on DRS Cluster.

For those of you that would like to know a little more about how Auto Deploy functions under the covers, there are basically five core components when it comes to Auto Deploy. There is the actual Auto Deploy server (1) which is essentially a web server that pushes an ESXi Image Profile to the server, this is driven by the Rules Engine (2) which is accessed/configured via PowerCLI along with the Image Builder. There is a requirement for a TFTP Server (3) which will store the gPXE bootloader (4) and push it to potential ESXi hosts that are led to it by a DHCP Server (5). Once gPXE is booted it is notified to grab the ESXi Image and Configuration from the Auto Deploy server.

In the video I cover everything that is needed for Auto Deploy to work, including to installation of vCenter Server and the associated Auto Deploy service as well as PowerCLI and creation of the Image Profile and Deployment Rule. By the end of the video you should have a firm understanding of how to leverage Auto Deploy in your environment to its full potential. I even include steps on how to slipstream third party vendor packages into your ESXi Image Profile, including; EMC PowerPath/VE, the VMware vCloud Director agent and the VMware Fault Domain Manager agent (vmware-fdm) which is required for VMware HA to properly function.

For reference, the EMC PowerPath/VE 5.7 vibs can be downloaded from EMC Powerlink, the VMware vCloud Director agent can be copied from your vCloud Director server from the /opt/vmware/vcloud-director/agent folder and the vmware-fdm agent can be grabbed directly from the vCenter Server by adding http://<vcenter-server>/vSphere-HA-depot as an esxsoftwaredepot in PowerCLI.

If you’d like to watch the how-to video it is located at the top of this post, it is 30 minutes in length but it does cover a lot of content so make sure you have enough time to watch it. Also, I suggest watching the video in full-screen mode by clicking the icon on the bottom right of the video. If for whatever reason the video isn’t displaying, you can also use the following link to view; http://youtu.be/1IJchZBEaFc

If you’re not into watching the video here are the necessary steps in raw form if you just want to deploy it and get it over with;

  1. Install VMware vCenter Server (Windows or vCSA)
  2. Install VMware vSphere Auto Deploy (or activate Auto Deploy in vCSA)
  3. Install VMware PowerCLI
  4. Download TFTP Boot Zip and place files on TFTP Server
  5. Create ESXi Image Profile with PowerCLI
    1. connect-viserver <vcenter-server-fqdn>
    2. add-esxsoftwaredepot “<path-to-esxi-zip>”
    3. add-esxsoftwaredepot “<path-to-vcloud-director-agent-zip>”
    4. add-esxsoftwaredepot “<path-to-emc-powerpath/ve-zip>”
    5. add-esxsoftwaredepot “http://<vcenter-server-fqdn>/vSphere-HA-depot”
    6. new-esximageprofile -cloneprofile “ESXi-5.0.0-<buildnumber>-standard” -name “<ImageProfileName>”
    7. add-esxsoftwarepackage -imageprofile “<ImageProfileName>” -softwarepackage vmware-fdm
    8. add-esxsoftwarepackage -imageprofile “<ImageProfileName>” -softwarepackage vcloud-agent
    9. add-esxsoftwarepackage -imageprofile “<ImageProfileName>” -softwarepackage powerpath.lib.esx
    10. add-esxsoftwarepackage -imageprofile “<ImageProfileName>” -softwarepackage powerpath.cim.esx
    11. add-esxsoftwarepackage -imageprofile “<ImageProfileName>” -softwarepackage powerpath.plugin.esx
  6. Create Deployment Rule with PowerCLI
    1. new-deployrule -name “<DeployRuleName>” -item “<ImageProfileName>” -AllHosts
    2. add-deployrule -name “<DeployRuleName>”
  7. Export Image Profile to ZIP Bundle
    1. export-esximageprofile -imageprofile “<ImageProfileName>” -exporttobundle -filepath “<path-and-filename-for-zip>”
  8. Create DHCP Static Reservation for ESXi Host
    1. Include DHCP Option 66 which is the TFTP Server fqdn or IP
    2. Include DHCP Option 67 which is the gPXE boot image (undionly.kpxe.vmw-hardwired)
  9. Boot ESXi Host
  10. New ESXi Host will be booted and automatically added to vCenter Server, you now have an option of configuring and creating a Host Profile. If you want to use the Host Profile you created for future ESXi Hosts you must do the following within PowerCLI
    1. new-deployrule -name “<DeployRuleName>” -item “<ImageProfileName>”,<HostProfileName>,<DRS-ClusterName> -pattern <optional, but could be mac or model based>
    2. add-deployrule -deployrule “<DeployRuleName>”
I know that seems a little confusing, but it is actually quite simpler than it looks.  You should be able to have the entire thing done during a lunch break :).

Created on December 27, 2011 by Rick Scherer

Posted under vCenter, vSphere.

This blog has 4,608 views.

Tags: , , , , , , , , , , , ,

1 Star2 Stars3 Stars4 Stars5 Stars (6 votes, average: 4.67 out of 5)

3 Comments so far

  1. Conrad
    3:19 pm on January 3rd, 2012

    Nice! I attempted to do this on a UCS system but apparently gPXE and windows DHCP have issues that I couldn’t resolve so I had to install a pfsense appliance and turn on dhcp on there, create the reservations, set the tftp options and I was good to go.

    Thanks! saved me a lot of time.

  2. Shaun Bender
    1:50 pm on January 6th, 2012

    Awesome video! Great Job!

  3. Mike
    1:38 pm on July 6th, 2012

    This video was awesome!!! I was able to follow along and setup in my lab without an issue. Great job!


  1. BrownBag Follow-Up: VCP5 Objective 1 January 12, 2012 8:30 am
  2. vmDK » Brownbag Follow-Up: VCP5 Section 1 January 14, 2012 2:26 pm

Leave a Comment

Name (required)

Email (required)



More Blog Post