Working with vSphere 5 Host Profiles

by admin

vSphere Host Profiles is a feature that allows an administrator to copy the configuration of one host, then apply that configuration to other hosts or clusters. This helps by reducing the amount of time it takes to configure a host, along with reducing the chance of any configuration errors by ensuring host configuration is consistent across your vSphere environment.

The general workflow for working with host profiles is as follows:

  1. Install and Configure the ESXi host that will be used as the reference host (The reference host is the host from which the host profile will be created).
  2. Create a profile using the reference host.
  3. Attach a host or cluster to the profile.
  4. Check the host’s compliance to the host profile. Host’s that are compliant have settings that match those defined in the profile, and are therefore deemed to be configured correctly.
  5. Apply the host profile to other Hosts or Clusters that haven’t yet been configured.

Host profiles can be used alongside Auto Deploy Server to quickly provision large numbers of ESXi hosts. You can access the host profiles view in vCenter by browsing to View > Management > Host Profiles: 

host-profiles-view

Creating a New Host Profile

There are a couple of ways to do this, either by right clicking on a host and selecting Host Profile > Create Profile from Host, or Selecting ‘Create Profile’ in the host profiles view:

host-profiles-create

This will start a series a screens from which you can create the new host profile.

  1. Select Create Profile from existing host, click next
  2. Choose which host you want to use as a basis for the new profile. This is the reference host. Click Next.
  3. Provide a name and description and then click Next.
  4. Click Finish to create the new host profile.

Exporting and Importing Host Profiles

You can export a host profile if you wish to. It will be exported to a file in the VMware profile format (.vpf). To do this, highlight the profile that you want to export, and click Export Profile:

host-profiles-export

A security warning may appear – click ok, then select a destination location and click Save.

When a host profile is exported, administrator and user profile passwords are not exported for security reasons. You will be prompted to re-enter the values for the password after the profile is imported and applied to a host.
To import a host profile from an existing .vpf file, it is a similar process to creating a new one. Click Create Profile in the Host Profiles view, but choose the option to import rather than create from a host:
host-profiles-import
Follow through the remaining screens to complete the import.

If you need to, as seen in the screenshot further up, you also have to option to clone an existing host profile.

Editing a Host Profile

Clicking the Edit Profile button will allow you to view and edit the policies contained in the host profile:

host-profiles-edit

A policy describes how a specific configuration setting should be applied. The editor allows you to change these policies/settings if you need to. As shown above, on the left side of the Profile Editor, you can expand the host profile. Each host profile is made up of several subprofiles that represent configuration instances. Each subprofile contains many settings that describe the configuration that is relevant to the profile. Clicking the Compliance Details tab within the editor shows whether the highlighted policy is considered during the compliance check. This can be changed if necessary on a per-policy basis.

Managing Host Profiles

You can attach a host profile to a cluster or host, then apply the profile to the cluster/host.
host-profiles-attach

Once the profile is attached to a host or cluster you can check compliance. This will determine which elements of the profile are not currently applied to the attached host.

host-profiles-check-compliance

We can see that the host this profile is attached to is not compliant with the host profile. We can apply the profile to the host, to update the hosts configuration. After applying the host profile, we can see that it is compliant:

host-profiles-compliant

Note that some settings in the host profiles cannot be shared and applied to all hosts. An example would be an iSCSI chap settings or initiator addresses. You will be prompted to enter values for these settings when you apply the policy. You will also be given the opportunity to review which policy settings will be applied. Note, that your host will need to be in maintenance mode before a host profile can be applied.

If you wish, you can exclude parts of a host profile, from being applied and from compliance checking. You can do this by right clicking on the profile and selecting ‘Enable/Disable Profile Configuration’:

host-profiles-policies

Updating Host Profiles from a Reference Host

If you change any settings on your reference host you can update your host profile by right clicking on the profile and selecting ‘Update Profile from Reference Host’. You can also change the reference host that this profile is using from this menu.

Using Host Profiles and Answer Files with AutoDeploy

When a virtual machine is deployed with AutoDeploy, a host profile is used to setup the host. Portions of the host profile require additional customization. These details are included in an answer file.

  1. Browse to the Host Profiles view in vCenter.
  2. Highlight the appropriate host profile.
  3. Click the Hosts and Clusters tab.
  4. Select the appropriate host from the list. Right-click the host and select Update Answer File.
  5. Update the user input parameters, and click Next. Then click Update to finish.

Answer files can be imported and exported from this view.

Useful Links and Resources

VMware Host Profiles Guide

Host Profiles Technical Overview

Keep up to date with new posts on Buildvirtual.net - Follow us on Twitter:
Be Sociable, Share!

Leave a Comment

*

Previous post:

Next post: