Managing the configuration of VMware vSphere ESXi hosts is important for a number of reasons, and host profiles makes it easy in vSphere 6.7. vSphere host configuration is key to success, we want to make sure our ESXi hosts truly share reassures, like networking and storage. We also need to make sure things like networks are named uniformly across hosts. If we are in a regulated environment, we may need to document host configuration, which becomes easy with host profiles. Ensuring ESXi hosts have a uniform configuration will remove a number of vSphere problems before they even start. Some shy away from host profiles because they seem complicated, but the truth is they really are not. A little up front configuration goes a long way, and it is well well worth it.
First things first, Host Profiles are a feature of vSphere Enterprise Plus. If you do not currently have vSphere Enterprise Plus licensing, it may make sense for you to test host profiles in a nested vSphere environment to see how it can help your organization. Remember, vSpehre comes with a 60 day evaluation license with all features unlocked. If you need to build a quick and easy test environment, be sure to check out William Lam’s Automated Lab Deployment which has been updated for vSphere 6.7.
Creating or a New Host Profile
As with everything else in VMware vSphere, there are many ways to accomplish the same task. This of course goes for creating or extracting a host profile too. I like to use the Shortcuts menu. Select Menu in the top navigation bar, then Shortcuts, and click on Host Profiles.
Next, let’s make a host profile. Click EXTRACT HOST PROFILE, and select the host you would like to make a profile from. Then name your profile. Be sure to give it a descriptive name so you know what it is to be used for. You could also right click a host, select Host Profile, and then Extract Profile to accomplish this.
You can also find Host Profiles under Policies and Profiles in the vCenter navigation menu.
Now we have a basic host profile that reflects the settings of the host we used to create it.
We can now do a number of things with this host profile like:
- Copy settings from host.
Now, let’s go through each of these and see what we can do with them.
Editing a Host Profile
You may want to edit a host profile to change a configuration on your vSphere hosts. To do this, first click on the host profile in the Host Profile menu, from the view above. Then click the configure tab, and Edit Host Profile. You can also expand your host profile settings to review from this screen before clicking EDIT HOST PROFILE.
You can then change the configuration of your ESXi host by editing the existing configuration which is displayed, or adding new configuration attributes. If you mouse over a configuration object, you will see a green plus sign, click the green plus sign to add another configuration item of that type. In this example, I have created a new standard vSwitch.
The same method can be used for adding additional attributes such as portgroups. Configuration items can also be removed by clicking the red X next to them when you move move over them with your mouse. When all changes are complete, make sure to click save!
Editing a host profile is a great way to perform a uniform configuration change on a number of hosts. On the other hand, if your host has changed and you need to update your host profile accordingly, you can click on COPY SETTINGS FROM HOST instead of EDIT HOST PROFILE from the screen above.
Duplicating a Host Profile
You may want to duplicate an existing host profile and make some changes like we just talked about. For example, if you have a new vSphere cluster with slightly different networking, you can just modify an existing host profile as needed. To duplicate a host profile, navigate to the main Host Profiles menu, then click select the host profile you would like to copy and click DUPLICATE HOST PROFILE.
Then, give the host profile a name and description. Click OK and you will now have your duplicate host profile.
Export Host Profile
You can export your host profile to use in another vCenter, wether it be at your primary location, disaster recovery location, or anywhere you need a vSphere cluster. It is also a good idea to export your host profile and keep a copy in a secured, backed up location. From the Host Profiles menu, just click EXPORT HOST PROFILE.
You will receive a warning message that administrator passwords are not exported with the profile, click Save, and a copy of your host profile will be saved locally to the machine you are accessing vCenter on.
Now that we know how to create and manipulate host profiles, let’s take a look at how to use them.
Configuring an ESXi Host with a Host Profile
When we talk about configuring an ESXi host with a host profile, it can be broken down into a few steps:
- Attaching a host profile
- Checking host profile compliance
- Remediating host with an attached host profile.
First, we must attach a host profile to our vSphere hosts. Host profiles can be attached to either a cluster or a single host at a time, I prefer to attach a host profile to a cluster to ensure the configuration is uniform across all hosts in a cluster. To do this, right click the cluster from the Hosts and Clusters view, navigate to Host Profiles, and select Attach Host Profile…
Then, select the host profile you would like to attach and click OK. From the same menu we attached the host profile, we will now see the additional options are no longer grey and are now selectable. This time, select Check Host Profile Compliance. You will see the complaince being checked in the Recent Tasks pane. After the check has been completed, it is time to check if the hosts are complaint with the attached profile.
This can be done at the cluster level by selecting the cluster, and navigating to Configure, then Host Profiles in the right navigation pane.
As you can see, the hosts are not in compliance with the attached profile. Before the hosts can be remediated, you will need to edit the host customizations. Depending on the configuration changes you are making, you may not need to change anything here. Select the hosts using the checkmark, and select EDIT HOST CUSTOMIZATIONS.
Review the options presented, and make changes as needed for your particular configuration. For example, if you created a new vmkernel port for each host, you would need to enter the IP address at this step. You can also use a CSV file as the source for host customizations. After you have finished, click OK.
From the same screen, once again select the vSphere hosts you would like to remediate. Now, click REMEDIATE… on the far right of the screen. Select the hosts you would like to remediate again on the next screen.
You will see two options, PRE-CHECK REMEDIATION and REMEDIATE. If you select PRE-CHECK REMEDIATION you will have an opportunity to see the changes that will need to be made on the ESXi hosts to ensure they are in compliance with the host profile.
To see what changes will be made after running a the pre-check remediation, select a host from the Host Profile Cluster Configuration screen, and click the arrow in the bottom pane. You will see the steps which will be performed during the remediation process.
If you click the REMEDIATE button, remediation will begin, and you will see your hosts have a status of “running remediation” in the Host Profile configuration screen. After remediation is complete, another compliance check will run, and your host will now be in compliance with the attached profile as illustrated.
This means your host configuration matches your host profile configuration, and when you have applied the host profile to a cluster you can be confident the cluster configuration is the same between each ESXi node. This is useful to reduce risk of misconfiguration, as well as to ensure compliance for regulated environments.
Be sure to check out VMware’s vSphere Host Profiles for 6.7 documentation here.
Ready to upgrade to vSphere 6.7? Here’s how to upgrade ESXi to 6.7 using Update Manager.