Configuring Auto Deploy in VMware

This section provides procedures that cover how to set up VMware for Auto Deploy which allows you to deploy ESXi 5.0 hosts and their associated configurations automatically. If you encounter problems, please refer to the VMware documentation.

To set up Auto Deploy, you install a vCenter server, a vSphere client, the Auto Deploy service, a DHCP server, a TFTP server, and the Image Builder PowerCLI and Powershell. The Image Builder PowerCLI Powershell is a commandlet and scripting language that allows you to build ESXi-based images and create rules to push out those images to your ESXi hosts.

This process requires virtual machines (VMs) for the following components and it requires the specified connectivity.

Prerequisites:

The following procedure explains how to install the Auto Deploy service and the components it relies on. It also covers how to create an Auto Deploy image profile using PowerCLI.

  1. Install vCenter server 5.0, if it is not already installed.
  2. Install the vSphere 5.0 client, if it is not already installed.
  3. Install the Auto Deploy service.

    The Auto Deploy service is a Web server that serves up ESXi images. The Auto Deploy service is embedded in the vCenter server appliance (vApp). When you install that appliance, Auto Deploy is automatically configured.

    However, to completely configure Auto Deploy you specify the location for the repository where the ESXi images are stored and the repository size. You also configure an Auto Deploy connection to the vCenter server, and you specify the IP address that the Auto Deploy service should use to communicate with the network.

    To verify that the Auto Deploy service is connected and configured, in vSphere, click Home > vCenter Service Status.

  4. Install a TFTP server.

    A TFTP server is required to push the boot loader to the ESXi host. You can install it wherever you choose, including on the same VM as the vCenter server.

    After you complete this process, the TFTP folder contains the boot loader that is streamed to the ESXi host.

    Note: Ensure that access to the TFTP server is granted. Also, disable IE ESC in MS Windows. If it is not disabled, error messages are generated reporting that you do not have access permission.

    You can install any TFTP server, for example, SolarWinds or Open TFTP. In any case, ensure that the timeout settings allow sufficient time to boot at least 4 ESXi hosts concurrently.

    1. In vCenter, at Home > Administration > Auto Deploy, click Download TFTP Boot Zip.
    2. Download the ZIP file and extract the contents to the root folder on the TFTP server.
    3. Configure the TFTP server and start the server instance.

      Ensure that the ESXi host is able to access it–that is, that no firewall rules are configured that would prohibit access.

  5. Install the Image Builder PowerCLI and Powershell.

    You enter all commands called out in this section in the PowerCLI.

    1. Change the execution policy. Enter the following command:

      set-executionpolicy remotesigned

  6. Get the required images.
    • Download the ESXi software depot (repository).

      This is not the ISO image. Rather, it is a file that VMware provides that has a name similar to the following one:

      VMware-ESXi-5.0.0-469512-depot.zip

    • Get the vGW Series VIB ZIP file.

      There are no restrictions on where you download this to.

  7. Using PowerCLI, create the Auto Deploy image profile and add the ESXi image to it.

    The image profile contains all module and features that you want to bundled together.

    Note that for all ZIP files, the command must include the filename with the .zip extension.

    1. Connect to vCenter.

      If you installed PowerCLI on vCenter, at the command line enter:

      connect-viserver localhost

    2. Add the ESXi depot. Enter the following command:

      add-esxsoftwaredepot ESXi-depot-zip-full-path

    3. Add the vGW Series VIB ZIP file. Enter the following command:

      add-esxsoftwaredepot VIB-zip-full-path

      Specify for the full path to where you downloaded the VIP ZIP previously, include the ZIP file name.

    4. Create an ESXi image profile and add the ESXi image to it. Enter the following command:

      new-esximageprofile -cloneprofile “VMware-ESXi-5.0.0-469512-standard” -name “image-profile-name

      The new-esximageprofile command clones an existing profile whose name you specify as the value of the (-cloneprofile) argument. The source image profile name is derived from the name of the ESXi software depot. It follows the version number of the depot file that you retrieved previously, for example “VMware-ESXi-5.0.0-469512-standard”.

      It could happen that the value that you specify for -cloneprofile causes an error to be generated, for example, because the VMware naming scheme has been changed. In this case, you can retrieve a list of profiles to find the correct name of the profile to clone. The name should have the same 6-digit build number as that of the depot ZIP file.

      To get a list of profile names, enter the following command:

      “Get-EsxImageProfile?”

      You can specify any name for the image profile image-profile-name to be created from the original one.

    5. Add the vGW Series VIB to the image profile. Enter the following command:

      add-esxsoftwarepackage -imageprofile “image-profile-name” –softwarepackage dvfilter-altor-vf

      To obtain the software package names, enter the following command:

      get-esxsoftwarepackage

    6. Create a deploy rule. The deploy rule downloads and installs all of the modules for the image into the Auto Deploy repository.

      Enter the following command:

      new-deployrule -name “auto-deploy-rule-name?” -item “image-profile-name?” -AllHosts?

      • Specify the name of the image profile that you created previously.
      • Specify a name for the deploy rule that you are adding to the image profile (auto-deploy-rule-name).

        Note: The rules specifies that the image applies to all hosts (-AllHosts?).

    7. Create an image profile ZIP file and export it to where you want the file to reside. Enter the following command.

      export-esximageprofile -imageprofile "image-profile-name?" -exporttobundle -filepath image-profile-location-full-pathname.

      Warning: Consider that PowerCLI is session based. If you exit the PowerCLI session without first exporting the bundle to the repository, the image cannot be reused.

    8. Add the deploy rule that you created. Enter the following command:

      add-deployrule -deployrule "auto-deploy-rule-name?"

  8. Set up DHCP to network-boot the ESXi host:
    1. Get the MAC address of the ESXi host.
    2. On the DHCP server:
      • Create an IP reservation for the ESXi host using its MAC address.
      • Add option 66 (Boot Server Host Name - TFTP server IP).
      • Add option 67 (Bootfile Name - undionly.kpxe.vmw-hardwired).
  9. Boot the ESXi host.

    Note: The ESXi host should appear in a vCenter datacenter automatically.

    Verify that the vGW VIB was installed. Select the ESXi host, click the Hardware Status tab, and expand Software Components. You should see the following entry: dvfilter-altor-vf.

After you create the host profile, configure the administrator password (Security configuration > Administrator password).

If you have multiple clusters, new ESXi hosts are placed through Auto Deploy in any available ones. To direct new ESXi hosts to a specific cluster, create a separate deploy rule using the following command. For example:

New-DeployRule -name "HostCluster" -item cluster-name -Pattern “ipv4=10.70.1.1-10.70.1.250”

Add-DeployRule -DeployRule HostCluster