Problems applying Host Profiles in vSphere 5

I came across an interesting issue today when attempting to apply a new host profile that had been created from a pre-configured ESXi 5 host. This particular host configuration was using four 1GbE NIC’s in a VST trunk. It contained two vswitches, one dedicated for iSCSI traffic (vswitch1) and the other for management, vmotion and virtual machine traffic (vswitch0).

The vswitch0 had the two host port groups configured as follows:

Each port group looked like this:

When I tried to apply the profile to a new host I ran into some weird problems. I could ping the management interface, but when I checked the hosts remote console (via HP iLO), the management interface showed the vMotion ip address and VLAN! Weird…

If I tried to manually change the hosts management interface from the management console it returned an error (unfortunately can’t quite remember the error but it made little sense 🙂 )

At this point I was stumped and had to reset the host configuration from the management console. I reapplied the profile and the same thing happened. Thinking that I must have screwed the profile up I went back to it. After looking and looking I could not think of anything wrong with it. I finally wondered if it was something to do with the order in which the port groups were being created…

I went back into my profile configuration, deleted the vMotion port group (argh, I wish the Host Profile editor was nicer!) and re-inserted its configuration below the management port group as shown below.

I saved it and re-applied the profile. Viola!

This time it worked!! Weird!!! So, in summary, there must be a requirement to apply the management port group before any other host port group, at least in the configuration I am using. If anyone out there has any ideas on why this is the case I’d love to hear them!

UPDATE: Just a quick followup to this old post. A reader below (thanks Alex!) pointed me to this VMware KB article that explains the bug:

It seems there is still no fix for this and requires the workaround as described above and in the KB article. Interestingly I have seen this same problem occur not only after applying the profile but after performing a host HBA rescan. The host disconnects and looking at the DCUI it shows the same symptom, the management address is now the vMotion one! Unfortunately for me this particular host is running production VM’s and the SSH service is not running 😦