Scott Drummonds on Virtualization

VMware Perfmon Counters Missing on vSphere?


I was recently shown a problem where the ESX Perfmon counters we added to vSphere 4.0 virtual machines were not appearing in Windows virtual machines as of vSphere 4.0 U1.  The problem stems from an issue with mofcomp, which I will briefly describe below. For the impatient, the workaround is to manually uninstall and then reinstall VMware Tools.  It also appears that the counters can be added by running vmStatsProvider, as I described in a previous article.

mofcomp is a tool provided by Microsoft and integrated with Windows that is used to register WMI classes such as VMware’s Perfmon counters with Windows.  For reasons that we do not entirely understand, but are tracking with a PR, mofcomp is failing during the tools upgrade on some systems.  Ideally a reinstall/upgrade/repair of VMware Tools will force a rerun of mofcomp and register the classes.  But the tools installer is not configured to do this today as a mofcomp failure was not anticipated by the developers that wrote the VMware Tools installer.

The key to the fix is to force mofcomp to run a second time.  This can be done in two ways:

  • Uninstall VMware Tools and then reinstall them.  Unlike a reinstall (also called a “repair” or “upgrade”) this will force mofcomp to be run during the second install.  It should work the second time.  If it does not, I would be interested to know.
  • Install the counters using the vmStatsProvider executable, which I documented previously.

Sorry for this problem, everyone.  We are tracking this issue and plan to improve the robustness of the installer as soon as possible.

8 Responses

In the first sentence, is “…were not disappearing…” suppose to be “…were not appearing…”?

At times, I am not seeing the VM counters in Perfmon on our ESX 4.0.0 systems. Here’s what I found:

At first glance I did not see them in Perfmon. But I had tried to Add Counters to the standard System Monitor graph..

On second glance, if I create a New Log Settings… and click on Add Objects, I see VM Memory and VM Processor in the list. I close that list and go back to Add Counters and now I see the VM counters. Also, if I go back to the System Monitor graph, I see the VM counters when Add to that list.

It seems that there is some initialization that needs to be done to get them into the list of counters. Do that initialization by doing New Log Settings then Add Objects.


    • Tim,

      Thanks for the wording correction. I applied the change.

      I will pass on your observations to the engineers working on this problem.

      Thank you!

  • I agree with Tim, I observed same thing. Thanks Tim. He saved a restart 🙂

  • I’ve noticed that Server 2008 x86 and Server 2008 R2 do not get fixed by re-installing VMware Tools.

    I have also tried an uninstall and re-install of the tools and this did not work.

    Trying the download patch supplied does not also work.

    The re-install fixes it with Server 2003 and the patch download worked as well.

    • I have reported this internally. Am looking into it.

      • Box293 and others. It would be really helpful if you guys can file a support request on this issue and reference this blog post so that we can track this and collect some information/logs from you. Once done, please post your SR number privately to Scott or me and we’ll take it up with engineering. Thanks!

  • I will do some more tests, log a case with VMware and get back to you with my SR number.

  • […] has since written a blog post that discusses this issue.  It looks like a complete uninstall of the VMware tools on the client […]