Monitor Child Partitions CPU Usage on Hyper-V with Powershell
Posted in Virtual Machine Manager, Windows Powershell | No Comment | 7,438 views | 22/10/2010 10:59
In one of the Technet question, John said:
“When the Hyper-V role is enabled, the physical machine becomes a virtual machine known as the parent partition. The virtual machines are called child partitions. Each partition is isolated from the other. Task Manager in any partition shows only the load on the cpus in that partitions. If the child partitions are heavily taxing the physical cpus, Task Manager in the parent partition shows little cpu activity (assuming you don’t have some heavy load in the parent, which you shouldn’t – best practice is to not have things running in the parent).”
So that means, looking task manager is not a way to know exact resource usage of Hyper-V. If you need to monitor CPU usages of child partitions (virtual machines), you should use Perfmon or.. yes, Powershell :) I wrote a little script to see CPU usages. In my environment, we use Windows Server 2008 with Powershell v1, so I have to write it in version 1. But If you have Powershell v2, you surely can use Get-Counter command.
But be careful. You need to run Powershell as an Administrator to reach perfmon counters. If not, you will get “Category does not exist” error.
Tags: cpu load on hyper-v guests, hyper-v cpu monitoring, hyper-v cpu usage, perfmon hyper-v cpu monitoring, powershell hyper-v child partition cpu
Leave a Reply