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:
- 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).
- Create a profile using the reference host.
- Attach a host or cluster to the profile.
- 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.
- 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:
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:
This will start a series a screens from which you can create the new host profile.
- Select Create Profile from existing host, click next
- Choose which host you want to use as a basis for the new profile. This is the reference host. Click Next.
- Provide a name and description and then click Next.
- 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:
A security warning may appear – click ok, then select a destination location and click Save.
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:
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
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.
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:
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’:
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.
- Browse to the Host Profiles view in vCenter.
- Highlight the appropriate host profile.
- Click the Hosts and Clusters tab.
- Select the appropriate host from the list. Right-click the host and select Update Answer File.
- Update the user input parameters, and click Next. Then click Update to finish.
Answer files can be imported and exported from this view.