Hyper-V root partitions and PerfMon counters
Of these other PerfMon counters, one is related to "the operating system (OS) that used to be the only OS on the server before Hyper-V was installed". In Hyper-V parlance, this is called the root partition. The architecture of Hyper-V requires that such a root partition be running on every virtual host. This partition, which can be a full version of Windows Server or a trimmed down Server Core instance, provides for administrative access and serves as the home for drivers used by itself and resident VMs. As a server that runs Hyper-V needs this "full OS" root partition, it is possible –though not recommended – for a Hyper-V host to run roles or applications in addition to Hyper-V.
Since you can install other functionalities, you may want to measure the root partition's resource use as well. The problem is that once Hyper-V is installed, your typical PerfMon counters don't behave in the same way. Viewing the value of % Processor Time shows overall processor usage across the root partition plus all virtual machines. If you want to view just the utilization of the root partition itself, the correct counter to monitor is Hyper-V Hypervisor Root Virtual Processor\% Total Run Time. This measurement will help you understand the resource needs of your server's "extra" functions.
Memory utilization counters
Memory utilization with Hyper-V is one counter that actually works with the traditional counters. Hyper-V cannot oversubscribe memory to virtual machines. This means that you can't assign more memory to resident virtual machines than you have physically installed into the server itself. As a result, you'll need to map out how much memory you assign to clients and carefully watch how much each VM uses. One counter that assists with understanding how much of that assigned memory is actually being used is Memory\Available Mbytes.
Microsoft's rule-of-thumb for assigning memory to Hyper-V is to reserve a minimum of 512 MB of RAM for the root partition. In addition, you must also reserve extra memory for every gigabyte of RAM assigned to a VM. Microsoft's standard is to reserve an additional 32 MB of RAM for the first gigabyte of RAM assigned to a virtual machine and 8 MB of RAM for each gigabyte thereafter. These reservations add up across all the VMs on the same server. Since all assigned memory is consumed by a virtual machine as it powers on, the value of Memory\Available Mbytes is a good marker for how much memory is consumed by these overheads in addition to the root partition.
PerfMon counters for VM networking
In terms of networking, Microsoft provides two virtual network adapters that can be attached to a VM. The "Network Adapter" is a synthetic device that leverages a VMBus connection to the root partition for its real functionality. As such it requires Hyper-V's integration services to be installed for functionality. In fact, these integration services should be installed to all of your Windows workloads. They provide critical management functions such as time integration and online backups, in addition to "enlightening" the virtual machine for better performance. An alternative is the "Legacy Network Adapter". This network adapter uses the much-slower emulation method of translating commands between VM and physical hardware and should only be used in limited situations.
Counters associated with both of these adapters are available in PerfMon. Look for Hyper-V Virtual Network Adapter\Bytes Received/sec and Hyper-V Virtual Network Adapter\Bytes Sent/sec as two useful counters for the synthetic (high-performance) driver as well as Hyper-V Legacy Network Adapter\Bytes Received/sec and Hyper-V Legacy Network Adapter\Bytes Sent/sec for the emulated (low-performance) driver. In all cases, measurements are made across virtual networks as created and bound to physical adapters in Hyper-V's Virtual Network Manager. When looking at performance across these counters, be aware that multiple VMs can share a small number of virtual networks. So the results your counters show may be aggregated across multiple virtual machines.
Other useful counters in Hyper-V
Lastly, Hyper-V adds three groups of counters that at first blush have limited utility, but can identify interesting behaviors that are occurring in an environment. The first of these, Hyper-V Task Manager Detail, provides information about specific tasks that have been completed as well as those that are in progress.
Another available counter, Hyper-V Virtual Machine Summary, provides the instantaneous count of virtual machines that are actively completing a particular action such as applying snapshot, deleting, merging disks, and running among others.
The third counter is an interesting one called Hyper-V Virtual Machine Health Summary which lists the count of VMs whose health is considered OK versus those that are considered critical. Unfortunately, no information could be located that explains the criteria that is used by these counters to identify a virtual machine's health at this time.
While these three groups may not appear immediately useful when looking at Performance Monitor's real-time graphs, they can be very useful for determining the state of a Hyper-V host either as part of a script, or when creating a data collector set to run as a scheduled task. For the snapshot-type data that is used in data collector set reporting, knowing the count of VMs in various states of operation can be handy for aligning your infrastructure with other stated performance metrics.
ABOUT THE AUTHOR:Greg Shields, MVP, is a co-founder and IT guru with Concentrated Technology (www.concentratedtechnology.com) with nearly 15 years of IT architecture and enterprise administration experience. He is an IT trainer and speaker on such IT topics as Microsoft administration, systems management and monitoring, and virtualization. His recent book Windows Server 2008: What's New/What's Changed is available from SAPIEN Press.
This was first published in December 2008