5

When trying to do some science to answer this question, I took a Windows 7 guest on a Server 2008 R2 host being managed by SCVMM 2012 and ran Prime95 on it to just generate some CPU usage.

Here's the Guest:

enter image description here

The Hyper-V host shows 12%, which is 1/8 cores (which is what is allocated), so that's looking correct:

enter image description here

But SCVMM is showing 0%:

enter image description here

I have left the stress test running for a long time, thinking that maybe SCVMM averages out over a long time (I thought it was 9 minutes, but I've been known to be wrong; just don't tell my wife).

Why is SCVMM showing 0% when everything else seems to disagree?

Mark Henderson
  • 68,316
  • 31
  • 175
  • 255

1 Answers1

2

From the SCVMM Engineering Blog:

Hyper-V hosts expose certain performance counters for a physical host and the virtual machines residing on it. SCVMM Server talks to each Hyper-V host over WSMAN to gather these performance metrics for the host and its VMs. SCVMM collects virtual machine performance metrics directly from its host because of some limitations of what a virtual machine understands about its true performance. Here a few interesting metrics explained.

1- Host CPU Average is exposed in SCVMM console as the “%Total Run Time” counter of “Hyper-V Hypervisor Logical Processors(_Total)” counter set*** averaged over past 9 minutes. This counter captures processor utilization being caused on the host (parent partition) and by the VMs. This value and other host performance metrics could be refreshed on demand as part of Refresh-VMHost or Refresh task in the SCVMM Console. Note that this value is different than what the Host’s Task Manager or %Processor Time(_Total) counter would show, which only considers parent partition utilization.

2- VM CPU Average is exposed in SCVMM console as the “%Guest Run Time” counter of “Hyper-V Hypervisor Virtual Processor(_Total)” counter set . This is the percent of time spent by the virtual processor(s) that run the VM. Since Hyper-V allows control of how many processors and what percent of their capacity can be assigned to a VM, the Guest Run Time counter value can never exceed the specified limit(see image below). Note that this is very different from the VM CPU% displayed in Hyper-V console, in which CPU utilization is displayed as VM Host Logical Processors utilization.

So SCVMM uses WinRM (which is the Windows implementation of WSMan) to gather those performance counters. Can you establish a WinRM session from your SCVMM server to the Hyper-V host? Can you then query those counters remotely? (They may be under the Virtualization namespace, not the CIMV2 namespace.)

Is there anything in the logs about SCVMM not being able to collect data for those counters?

Also, give "winrm quickconfig" or "winrm qc" a try on your Hyper-V host if it's not already enabled and listening.

Test remote WinRM functionality

At an elevated command prompt type:

winrm id –r:remoteserver

This should produce output similar to below:

winrm id -r:vmmr2lab-cl20

IdentifyResponse

ProtocolVersion = http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd

ProductVendor = Microsoft Corporation ProductVersion = OS: 6.1.7201 SP: 0.0 Stack: 2.0

If instead an error such as below appears, this means WinRM is not set up correctly on the remote machine, or there is something preventing communication over the WinRM port between the two systems. This could be a firewall or antivirus/malware programs.

WSManFault

Message = The WinRM client cannot complete the operation within the time specified. Check if the machine name is valid and is reachable over the network and firewall exception for Windows Remote Management service is enabled.

Error number: -2144108250 0x80338126

The WinRM client cannot complete the operation within the time specified. Check

if the machine name is valid and is reachable over the network and firewall exception for Windows Remote Management service is enabled.

In this event, test local WinRM functionality on the remote system. If WinRM is configured correctly on the remote system as well the cause is most likely network communication between the two machines. Troubleshoot this as you would any network issue.

Ryan Ries
  • 55,011
  • 9
  • 138
  • 197