Here at H9Labs we're always busy creating the next "it" thing for virtualization, but never too busy to listen to our customers. Well, one of customers notified us that the H9Labs GuessMyOS and Search Bar plug-ins were causing the Message of the Day (MOTD) to appear with an annoying frequency in the VI client. In fact, the MOTD was appearing in *ALL* attached VI clients. And not just when the administrators were logging into the VI client, but over and over and over again. For no apparent reason.
Ugh.
Could my plug-ins be the cause? I tend to take the approach of Beverly Crusher. "If there is nothing wrong with me, there must be something wrong with the Universe." A rapid debugging frenzy ensued and we discovered that the plug-ins were not buggy, they were in fact triggering a bug in VMware's VirtualCenter. It seems that frequent logins (from anywhere) to VirtualCenter will cause VirtualCenter to broadcast erroneous multiple GlobalMessageChangedEvent events that all attached VI clients receive and display. Don't believe us? You too can cause this bug to rear its ugly little head, simply follow these steps:
1. Log in to the VI client.
2. Set a MOTD. The MOTD will now be broadcast once to all attached clients and to any client that logs in.
3. Open a PowerShell prompt and run this script, replacing the server name, username, and password with your site specific values.
while (1 -eq 1) { connect-viserver -Server $SERVER -Username $USERNAME -Password $PASSWORD); disconnect-viserver -Confirm }
4. The script will continually prompt you to disconnect your session. Just keep hitting Y or A.
Eventually you will see the MOTD appear in the VI client even though it hasn't changed. There is a VMware community thread about the subject and U3 appears to resolve the issue in its release notes, but this does not appear to be the case. Having examined the VI client code using reflection the only time the MOTD is displayed is when VirtualCenter advertises the GlobalMessageChangedEvent event. It then follows that VirtualCenter must be sending out multiple MOTD events due to some bug triggered by rapid log in attempts.
Well, I guess there is nothing left to do but to write a patch for the VI client that prevents it from displaying the erroneous MOTD broadcast messages. And that is just what we did. The H9Labs MOTD Fix Plug-in tells the VI client not to worry about displaying MOTD broadcast messages and takes over the MOTD broadcast business.
Just one more helpful utility from the fine folks at H9Labs. :)