One of the main tasks that IT, server, and virtualization administrators have on a daily basis is monitoring infrastructure. Monitoring becomes increasingly important in virtualized environments as resources for each VM are aggregated on the physical hosts they reside on. If resources become starved on one VM or it begins to require more resources than it is entitled to, this can affect the performance of the entire environment. The architecture of virtualized environments can also skew troubleshooting to some extent.
In the world of Microsoft Hyper-V, there are various tools that can be used to manage and monitor the Hyper-V host and the guest VMs running. What tools are available for monitoring Hyper-V hosts and guest VMs? Let’s see how IT administrators can effectively keep a pulse on Hyper-V environments to ensure they are performing correctly and are healthy.
Effectively Monitoring Hyper-V Host and Guest VMs
One of the challenges with virtualized environments that can surface is the order of troubleshooting an issue with your applications. You must determine whether the issue is with the Hyper-V host or guest virtual machine the application is running on.
When you run into situations where application performance is suffering in your Hyper-V environment, you have to start running through a checklist of sorts to narrow down on the issue. The following questions can be very helpful in troubleshooting Hyper-V host and VM guest issues.
- Have you verified the Hyper-V VM is not suffering from starved resources?
- What about the Hyper-V host? Does the Hyper-V host have the appropriate headroom available from a resource perspective?
- Does the performance issue exist on numerous VMs or a single VM?
Often, these three simple questions help to narrow down on whether you are dealing with a Hyper-V host or a guest VM related issue.
After you determine that either Yes the performance issue is across the board or No it is only related to a certain VM, then you at least have a direction to start looking. Even if you aren’t sure about the answers to those questions, what tools can you use to monitor Hyper-V hosts and guest VMs?
Let’s look at the following tools that can be effective in monitoring Hyper-V hosts and guest VMs including performance:
- Task Manager
- Event Viewer
- Resource Monitor
- Hyper-V Manager
- System Center Virtual Machine Manager
It may sound simple and too obvious; however, Task manager is a quick and easy place to start when troubleshooting performance in a Hyper-V environment. Hyper-V runs on top of Windows Server and Windows Server underneath the hood. Task Manager works equally as well with Hyper-V in a basic high-level look at what processes are taking up resources.
In addition, Task Manager is a great way to determine inside a guest Hyper-V VM what process may be causing a CPU race or memory pressure issue. Certain applications like Microsoft SQL Server and others are notorious for taking large CPU and memory, especially if they are not tuned and configured correctly.
Event Viewer is a great tool when it comes to determining if there are application-specific or system logs either on the Hyper-V host or guest virtual machines that indicate there may be an issue. Generally, the Application log shows errors related to applications running on the Hyper-V host or guest VMs. The System log as you would expect details issues generally at the operating system level.
Under the applications and services logs, you will find the specific Hyper-V logs that can be used for troubleshooting the Hyper-V host for issues.
The Perfmon utility has long been the “gold” standard in troubleshooting Windows performance and monitoring various metrics that contribute to the overall performance profile of a Windows machine. This also translates to great tools and features for monitoring Hyper-V. Microsoft recommends the following monitors in Perfmon for Hyper-V:
- Logical Processor Utilization – \Hyper-V Hypervisor Logical Processor(*)\% Total Run Time (look for values over 90%)
- Virtual Processor Utilization – \Hyper-V Hypervisor Virtual Processor(*)\% Total Run Time (look for values over 90%)
- Root Virtual Processor Utilization – \Hyper-V Hypervisor Root Virtual Processor(*)\% Total Run Time (look for values over 90%)
- Memory\Available Mbytes
- Hyper-V Dynamic Memory Balancer (*)\Available Memory
You can use the following performance counters from the host:
- Network Interface (network adapter name)\Bytes/sec
You can use the following performance counters from the virtual machine:
- Hyper-V Virtual Network Adapter (virtual machine name
- Physical Disk(disk letter)\Avg. disk sec/Read
- Physical Disk(disk letter)\Avg. disk sec/Write
- Physical Disk(disk letter)\Avg. disk read queue length
- Physical Disk(disk letter)\Avg. disk write queue length
PowerShell is a great way to interact with Windows Server in general and definitely provides a great way to troubleshoot and monitor Hyper-V hosts and guest VMs. You can interact with the Windows Event Log with PowerShell directly if you want. For instance, if you want to get the operational logs for Hyper-V, you can use the following PowerShell one-liner cmdlet:
- Get-WinEvent -LogName Microsoft-Windows-Hyper-V-Hypervisor-Operational | select -First 1 | Format-List *
You can also use Powershell to interact directly with the Performance counter objects on either the host or guest virtual machines using the Get-Counter cmdlet.
The Resource Monitor utility is a great utility that is often underutilized. Resource Monitor is an easy way to View Perfmon data. Perfmon, while extremely powerful, requires a bit of a learning curve to get the full benefit. Resmon removes quite a bit of a barrier to entry in regards to getting meaningful data.
According to Microsoft, the Resource Monitor utility is a combination of Perfmon data and Windows Event Tracing data. In fact, when you launch Resource Monitor, you will see the background process launched for Perfmon.
Resource Monitor is an intuitive and easy way to consume your Perfmon data as it aggregates and displays everything in a very easily readable dashboard of sorts. You have the following tabs:
Hyper-V manager is the default means that you have to manage your Hyper-V host and guest VMs. The functionality it provides is fairly basic, however, you do have some visibility at a high-level as to VM performance, including CPU and memory being used. This can allow you to quickly determine if a CPU race condition exists on a VM or if all the available memory assigned has been consumed.
System Center Virtual Machine Manager (SCVMM)
There is no question that if you are managing a large-scale Hyper-V infrastructure, System Center Virtual Machine Manager is a valuable component to successfully managing and monitoring Hyper-V hosts and guest VMs at scale. SCVMM contains really great features related to the monitoring of Hyper-V hosts and guest VMs.
In the Overview dashboard, you can click a Hyper-V cluster or hosts and get an overview of performance metrics and an overall “lay of the land” with your Hyper-V real estate.
If you scroll down on the Overview page, you will see the Performance dashboards displayed for CPU, Memory, Storage, and Network.
Another helpful display for performance monitoring is historic performance charts that are available on the Overview dashboard. This provides Monthly host performance statistics.
You can also get a good overview of your Hyper-V guest VMs using SCVMM, including Memory configuration, Daily performance CPU metrics.
Out of the tools listed, SCVMM is a pay for solution from Microsoft. However, if you are in a large Hyper-V environment, SCVMM may well be worth the investment into the System Center solution as it allows great management features and visibility for monitoring purposes.
In this post, we looked at 7 Tools for monitoring Hyper-V hosts and guest VMs. Microsoft has provided a wide range of tools and utilities inside Windows to gather performance and other metrics for monitoring purposes. Using any of the tools mentioned, you have the ability to pinpoint where issues may reside, both for a Hyper-V host and a guest VM.
Some of the tools may help pinpoint issues quickly (Task Manager, Resmon, PowerShell, Event Viewer), others are a bit more involved (Perfmon) while others are paid solutions (SCVMM). However, by using one or a combination of the tools mentioned, you can most likely pinpoint issues in your Hyper-V virtualized environment, either on the Hyper-V host or guest VM.Like what you read? Rate us