#5: Use Host Profiles for Configuration Consistency
Oddly, this scenario doesn't just apply to this situation; there are many others. For example, you have one odd host you pieced together and you have a quad-port PCIe instead of a dual-port like the rest of your servers. What if VMware, in its infinite knowledge, chooses to label ports 3-4 of that nic vmk2 and vmk3, instead of vmk4 and vmk5 like you expect? (How to change vmk-to-physical-nic port assignments)
Host profiles are primarily for: 1) consistency, especially across larger data centers, though small data centers of even two or three hosts can greatly benefit from it, too; and 2) error checking, since even the best mistype things from time to time. For some good reading on this topic, check out the VMware Host Profiles Technical Overview.
- VMK consistency. Makes sure each of your vmknics is assigned to the same vStandard Switch (vSS) or vDistributed Switch (vDS), as well as the same physical host port.
- NFS consistency. Makes sure all NFS mounts are with the same scheme (IP or DNS name) and that all mounts are present.
- Memory/kernel setting consistency. Makes sure that the host memory settings for the VMkernel and other kernel settings are consistent.
- NTP consistency. NTP is essential for an optimized VMware installation (I will further explain why later).
- Advanced Settings (i.e., UserTimeout, SuppressShellWarning,Annotation.WelcomeMessage). I normally configure three settings be default in all my configurations, unless there is a business requirement to the contrary: UserVars.Timeout (900), SuppressShellWarning(1), and Annotation.WelcomeMessage(you are using this production system, blaa blaa).
- Firewall and security settings. I typically enable SSH to start and stop with the host for troubleshooting, again, unless a business requirement states otherwise—though almost everyone allows SSH. (This coincides with the SuppressShellWarning setting above, since enabling it will give you a nice triangle with exclamation point by default)
- Storage PSP selection/application. Ensures that all your datastores are seeing the correct SATP and applying the corresponding PSPs throughout.
- Vendor (aka NetApp, as well as others) specific settings. Admins use the NetApp Virtual Storage Console (VSC) to apply several settings relating to QueueDepth, NFS TCP settings, etc. If for some reason you don't have access to or can't install the VSC, you can apply the settings manually to one host and use VMware Host Profiles to apply to the remaining—saving you valuable time.
- vSS and vDS names, uplink consistency, and vmnic assignments. Makes sure that everything is consistent across the data center, so that vMotions and svMotions don't fail due to incompatibility or anything like that.
- And more . . .
Did I mention that Host Profiles are exportable and importable? (for those of us who configure VMware for customers)
CAn I use Host Profiles with Different Physical Hardware?
You can easily exclude certain settings from being checked for compliance by adjusting the template—you just have to know where to look! Read more on using host profiles with different underlying hardware. Also, check out VMware KB 2002488.
Other Juicy Tidbits
- You don't have to delete a host profile to change the host: simply right-click and select "change reference host"
- Note that the "change reference host" actually only does that; you still have to run "update from reference host" to actually recollect the settings and modify the host profile.
- As I mentioned, host profiles are importable and exportable, so if you are setting up an entirely new vCenter you can bring all your custom configurations with you!