Q. How can I tell how much CPU a guest OS is using from the host OS with Hyper-V?
July 19, 2009
A. If you look at Task Manager on the host OS (the OS installed on the physical hardware running the Hyper-V role) and look at CPU usage, you only see the CPU used by the host OS instance. You can't see CPU used by any guest (virtual) OSs, because the hypervisor manages that CPU usage.
To let the host OS see what the guest OSs are doing, you need to look at two main areas, the actual processor usage by the virtual machine (VM) and the hypervisor work on behalf of the VM. In addition, if you're going to be really complete, you should look at the CPU usage by the VM Worker Process (vmwp.exe) for the each VM that runs in the host OS instance.
You can use Performance Monitor and the Hyper-V Hypervisor Virtual Processor counters to easily get a look into both the guest and hypervisor runtime CPU usage by adding the counters %Guest Run Time and %Hypervisor Run Time for either all of the guests or for particular guest instances. You can see the guest and hypervisor CPU usage for two of my VMs here. Each VM has a single virtual processor.
Click to expand. |
You can also see in the picture that I have identified which vmwp.exe instance relates to the VM by examining the full initiation command line that shows the GUID of the VM. I cover this topic more in this FAQ.
Related Reading:
Q. What are Virtual Machine Queue (VMQ) and VM-Chimney in Hyper-V R2?
Q. The output from Get-WindowsFeature doesn't help me. How can I query whether a role or feature is installed?
Q. Should I back up at the Hyper-V host level or within my guest OSs?
Check out hundreds more useful Q&As like this in John Savill's FAQ for Windows. Also, watch instructional videos made by John at ITTV.net.
About the Author
You May Also Like