Mastering VMware vSphere 6. Marshall Nick
to the physical host.
Figure 2.7 Host information is echoed to the server console when it performs a network boot.
When the host has finished executing, you have a system running ESXi. The Auto Deploy server can also automatically join the ESXi host to vCenter Server and assign a host profile (which we’ll discuss in a bit more detail in Chapter 3) for further configuration. As you can see, this system potentially offers administrators tremendous flexibility and power.
Ready to get started with provisioning ESXi hosts using Auto Deploy? Let’s start with setting up the vSphere Auto Deploy server.
Finding the vSphere Auto Deploy Server
The vSphere Auto Deploy server is where the various ESXi image profiles are stored. The image profile is transferred from this server via HTTP to a physical host when it boots. The image profile is the actual ESXi image, and it consists of multiple vSphere Installation Bundle (VIB) files. VIBs are ESXi software packages; these could be drivers, Common Information Management (CIM) providers, or other applications that extend or enhance the ESXi platform. Both VMware and VMware’s partners could distribute software as VIBs.
The vSphere Auto Deploy service is installed but not enabled by default with vCenter Server. Previous versions of vSphere required a separate install of Auto Deploy.
1. Open up the vSphere Web Client (if you haven’t installed it yet, skip ahead to Chapter 3 and then come back) and connect to vCenter Server.
2. Navigate to vCenter Inventory Lists
You’ll see information about the registered Auto Deploy service. Figure 2.8 shows the Auto Deploy screen after we installed vCenter and enabled the Auto Deploy service.
Figure 2.8 This screen provides information about the Auto Deploy server that is registered with vCenter Server.
That’s it for the Auto Deploy server itself; once it’s been installed and is up and running, there’s very little additional work or configuration required, except configuring TFTP and DHCP on your network to support vSphere Auto Deploy. The next section provides an overview of the required configurations for TFTP and DHCP.
Configuring TFTP and DHCP for Auto Deploy
The procedures for configuring TFTP and DHCP will vary based on the specific TFTP and DHCP servers you are using on your network. For example, configuring the ISC DHCP server to support vSphere Auto Deploy is dramatically different from configuring the DHCP Server service provided with Windows Server. Therefore, we can provide only high-level information in the following section. Refer to your specific vendor’s documentation for details on how the configuration is carried out.
Configuring TFTP
For TFTP, you need only upload the appropriate TFTP boot files to the TFTP directory. The Download TFTP Boot Zip link shown in Figure 2.8 provides the necessary files. Simply download the zip file using that link, unzip the file, and place the contents of the unzipped file in the TFTP directory on the TFTP server.
Configuring DHCP
For DHCP, you need to specify two additional DHCP options:
• Option 66, referred to as next-server or as Boot Server Host Name, must specify the IP address of the TFTP server.
• Option 67, called boot-filename or Bootfile Name, should contain the value undionly.kpxe.vmw-hardwired.
If you want to identify hosts by IP address in the deployment rules, then you’ll need a way to ensure that the host gets the IP address you expect. You can certainly use DHCP reservations to accomplish this, if you like; just be sure that options 66 and 67 apply to the reservation as well.
Once you’ve configured TFTP and DHCP, you’re ready to PXE boot your server, but you still need to create the image profile to deploy ESXi.
Creating an Image Profile
The process for creating an image profile may seem counterintuitive at first; it did for me. Creating an image profile involves first adding at least one software depot. A software depot could be a directory structure of files and folders on an HTTP server, or (more commonly) it could be an offline depot in the form of a zip file. You can add multiple software depots.
Some software depots will already have one or more image profiles defined, and you can define additional image profiles (usually by cloning an existing image profile). You’ll then have the ability to add software packages (in the form of VIBs) to the image profile you’ve created. Once you’ve finished adding or removing software packages or drivers from the image profile, you can export the image profile (either to an ISO or as a zip file for use as an offline depot).
All image profile tasks are accomplished using PowerCLI, so you’ll need to ensure that you have a system with PowerCLI installed in order to perform these tasks. We’ll describe PowerCLI, along with other automation tools, in more detail in Chapter 14, “Automating VMware vSphere.” I’ll walk you through creating an image profile based on the ESXi 6.0 offline depot zip file available for downloading by registered customers.
Perform the following steps to create an image profile:
1. At a PowerCLI prompt, use the Connect-VIServer cmdlet to connect to vCenter Server.
2. Use the Add-EsxSoftwareDepot command to add the ESXi 6.0 offline depot file:
Add-EsxSoftwareDepot C: \vmware-ESXi-6.0-XXXXXX-depot.zip
3. Repeat the Add-EsxSoftwareDepot command to add other software depots as necessary. The following code listed adds the online depot file:
Add-EsxSoftwareDepot
https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml
4. Use the Get-EsxImageProfile command to list all image profiles in all currently visible depots.
5. To create a new image profile, clone an existing profile (existing profiles are typically read-only) using the New-EsxImageProfile command:
New-EsxImageProfile –CloneProfile "ESXi-6.0-XXXXXX-standard"–Name "My_Custom_Profile"
Once you have an image profile established, you can customize it by adding VIBs or you can export it. You might want to export the image profile because after you exit a PowerCLI session where you’ve created image profiles, the image profiles will not be available when you start a new session. Exporting the image profile as a zip file offline depot, you can easily add it back in when you start a new session.
To export an image profile as a zip file offline depot, run this command:
Export-EsxImageProfile –ImageProfile"My_Custom_Profile" –ExportToBundle–FilePath"C: \path\to\ZIP-file-offline-depot.zip"
When you start a new PowerCLI session to work with an image profile, simply add this offline depot with the Add-EsxSoftwareDepot command.
The final step is establishing deployment rules that link image profiles to servers in order to provision ESXi to them at boot time. I’ll describe how to do this in the next section.
Establishing Deployment Rules
The deployment rules are where the “rubber meets the road” for vSphere Auto Deploy. When you define a deployment rule, you are linking an image profile to one or more hosts. At this point vSphere Auto Deploy will copy all the VIBs defined in the specified image profile up to the Auto Deploy server so they are accessible from the hosts. When a deployment rule is in place, you can actually begin provisioning hosts via Auto Deploy (assuming all the other pieces are in place and functioning correctly, of course).
As