In this article, we will show you how to monitor Hyper-V server (host) using Perfmon view.
Hyper-V is the virtualization server role in Windows Server. Virtualization servers can host multiple virtual machines that are isolated from each other but share the underlying hardware resources by virtualizing the processors, memory, and I/O devices. By consolidating servers onto a single machine, virtualization can improve resource usage and energy efficiency and reduce the operational and maintenance costs of servers. In addition, virtual machines and management APIs offer more flexibility for managing resources, balancing load, and provisioning systems.
In This Article
Hyper-V publishes performance counters to help characterize the behavior of the virtualization server and report the resource usage. The standard set of tools for viewing performance counters in Windows includes Performance Monitor and Logman.exe, which can display and log the Hyper-V performance counters. The names of the relevant counter objects are prefixed with Hyper-V.
As you probably know, Performance Monitor aka (Perfmon) is a system monitoring program built into Windows since Win NT,… it has been developed over the years to include all applications workload.
So let’s dig dive and see how to monitor our Hyper-V host…
Hyper-V Performance Monitor
Please note the steps described below will work on Windows Server Hyper-V with Desktop Experience, and not on Server Core or pure Hyper-V host without GUI. The performance monitor tool is not supported on Server Core, in case you are using Server Core or pure Hyper-V host, then make sure to use Windows Admin Center to monitor its performance.
If you still want to monitor pure Hyper-V host or Server Core with the Hyper-V role installed, then you could use logman.exe to monitor your Server Core box from the command line as described in this article.
Kick-off MMC console and choose Performance monitor:
Right-click and +Add Counter
Add the following counters:
Hyper-V Dynamic Memory Balancer\Available Memory * Hyper-V Dynamic Memory VM\Average Pressure * Hyper-V Hypervisor Logicol Processor\%Total Run Time * Hyper-V Hypervisor Root Virtual Processor\%Total Run Time * Hyper-V Hypervisor Virtual Processor\%Total Run Time * Hyper-V Virtual Network Adapter\Bytes/sec Memory\Available MBytes * Network Adapter\Bytes Total/sec * Physical Disk\Avg. Disk Bytes/Read * Physical Disk\Avg. Disk Bytes/Write * Physical Disk\Avg. Disk Read Queue Length * Physical Disk\Avg. Disk Write Queue Length *
Change the output from Line/Histogram bar to Report and enjoy the Real-time monitoring.
Don’t forget to save the counters as (Hyper-VMonitor.msc) so you can fire the Real-time monitoring counters at any time.
As described in this article, you should always measure the CPU and memory usage of the physical system by using the Hyper-V Hypervisor Logical Processor performance and the Memory counters. The CPU utilization counters that Task Manager and Performance Monitor report in the root and child partitions do NOT reflect the actual physical CPU usage.
Make sure to check my recent Windows Server Hyper-V Cookbook for in-depth details about Hyper-V!
Hope this has been useful.
Until next time, enjoy your day!