How to Monitor Hyper-V Virtual Machine Performance
In this article
Monitoring Hyper-V virtual machines (VMs) is essential for keeping your virtualized infrastructure healthy, avoiding resource contention, and planning for future capacity. This guide walks you through the built-in tools and methods—Performance Monitor, Hyper-V Manager, and PowerShell—so you can track CPU, memory, disk, and network usage effectively. No extra software is needed; everything described here ships with Windows Server and Windows 10/11.
What You'll Need
- A Windows machine with Hyper-V enabled (Windows 10/11 Pro or Enterprise, or Windows Server).
- Administrator rights on the Hyper-V host.
- Access to the Hyper-V Manager console (or PowerShell with the Hyper-V module).
- Basic familiarity with the Windows Task Manager and Performance Monitor—though this guide explains each step.
Step-by-Step
Step 1: Open Hyper-V Manager and Check VM Health at a Glance
- Press Win + R, type
virtmgmt.msc, and press Enter. This opens Hyper-V Manager. - In the left pane, select your host (the computer name). The middle pane lists all VMs.
- Look at the Status column—it shows Running, Off, or Saved. A running VM is your first sign that it's operational, but it doesn't tell you about performance.
- Right-click a VM and choose Connect to see the VM's console, but for performance metrics, stay in the manager.
Step 2: Use Task Manager for Quick, Real-Time CPU and Memory Checks
- On the Hyper-V host, press Ctrl + Shift + Esc to open Task Manager.
- Go to the Performance tab. You'll see the host's overall CPU and memory usage.
- To see per-VM CPU usage, click Open Resource Monitor at the bottom, then go to the CPU tab. Expand the Hyper-V VM processes (they appear as
vmwp.exe). - For memory, the Memory tab in Resource Monitor shows the host's total, but not per-VM. For per-VM numbers, use Performance Monitor (next step).
- This method is fine for a quick look, but it doesn't give you historical data or detailed counters.
Step 3: Use Performance Monitor for Detailed, Per-VM Counters
- Press Win + R, type
perfmon, and press Enter. - In the left pane, expand Monitoring Tools and click Performance Monitor.
- Click the green + button in the toolbar to open the Add Counters dialog.
- In the list of counters, scroll down and expand Hyper-V Hypervisor Virtual Processor.
- Select the counter % Total Run Time. In the Instances of selected object box, you'll see entries like
VM Name\Virtual Machine Id. Choose the VM you want to monitor, then click Add. - Repeat for other counters you need:
- Hyper-V Hypervisor Logical Processor → % Total Run Time (host CPU usage).
- Hyper-V Dynamic Memory Balancer → Available Memory (for VMs using dynamic memory).
- Hyper-V VM Vid Partition → Physical Pages Allocated (memory assigned to a VM).
- Hyper-V VM Vid Partition → Physical Pages Allocated (memory assigned to a VM).
- Hyper-V VM Vid Partition → Physical Pages Allocated (memory assigned to a VM).
- Click OK. The graph now shows live values. Right-click the graph and choose Properties to adjust the scale, line style, or add a title.
Step 4: Monitor Disk and Network Performance
- In the same Add Counters dialog, expand PhysicalDisk (or LogicalDisk).
- Add % Disk Time or Avg. Disk Queue Length for the physical disk that hosts the VM's VHDX files. A queue length consistently above 2 per disk indicates a bottleneck.
- For network, expand Hyper-V Virtual Switch and add Bytes Sent/sec and Bytes Received/sec. Select the virtual switch instance (often named External or Internal).
- These counters show real-time values. For a longer view, you need to collect logs (see Step 6).
Step 5: Use PowerShell for a Quick Snapshot of All VMs
- Open PowerShell as Administrator on the host.
- Run the following command to get CPU and memory for all VMs:
Get-VM | Select-Object Name, State, CPUUsage, MemoryAssigned, MemoryDemand - For a more detailed view including disk I/O, use:
- Note that
CPUUsageis a percentage of the host's total CPU, not the VM's allocated CPU. For per-VM CPU usage relative to its virtual processors, use Performance Monitor counters.
Step 6: Set Up a Data Collector Set for Historical Logging
- In Performance Monitor, expand Data Collector Sets → User Defined.
- Right-click User Defined and choose New → Data Collector Set.
- Give it a name (e.g., "Hyper-V Performance"), choose Create manually (Advanced), and click Next.
- Select Create data logs → Performance counter, then click Next.
- Click Add and pick the counters you want (same as Step 3). For a good baseline, include:
- Hyper-V Hypervisor Virtual Processor → % Total Run Time (all instances)
- Hyper-V Dynamic Memory Balancer → Available Memory
- PhysicalDisk → % Disk Time (all instances)
- Hyper-V Virtual Switch → Bytes Sent/sec and Bytes Received/sec
- Set the sampling interval (e.g., every 15 seconds) and click Next.
- Choose where to save the log file (default is
%systemdrive%\PerfLogs). Click Finish. - Right-click the new data collector set and choose Start. Let it run for a few hours or days.
- When done, right-click and choose Stop. Then open the .blg file in Performance Monitor to analyze the trend.
Common Mistakes
- Monitoring the host instead of the VM: The host's overall CPU usage doesn't show which VM is consuming resources. Always use the Hyper-V counters with the VM instance selected.
- Ignoring memory pressure: A VM with dynamic memory may show low assigned memory but high demand. Watch Memory Demand to see if the VM actually needs more.
- Using % Total Run Time incorrectly: This counter can exceed 100% if the VM has multiple virtual processors. For example, a VM with 4 vCPUs can show 400%. That's normal.
- Not accounting for disk latency: High disk usage doesn't always mean a problem; high latency does. Use Avg. Disk sec/Transfer to see if disk operations are slow.
- Forgetting to stop the data collector: Leaving it running can fill up your disk with log files. Set a schedule or remember to stop it.
Tips
- Create a baseline: monitor a VM during normal operation for a week, then compare against that when issues arise.
- Use the Hyper-V Manager Replication and Integration Services to keep guest time synchronized—this helps accurate CPU measurements.
- For quick alerts, use PowerShell to script a check that emails you when CPU usage exceeds a threshold.
- Use Resource Metering in Hyper-V (via
Enable-VMResourceMetering) to track average CPU, network, and disk usage over time per VM. - If you have many VMs, consider exporting the Performance Monitor data to a CSV for analysis in Excel.
Troubleshooting
- Performance Monitor shows no data: Make sure you selected the correct instance (the VM name). If the VM is off, its counters won't appear. Also check that the Performance Log Users group has access to the log folder.
- Counters missing from the list: The Hyper-V counters are only available on the host, not inside the guest. Re-run
perfmonon the host. If they still don't appear, ensure the Hyper-V role is fully installed. - CPU usage shows 0% for a VM that's clearly busy: This can happen if the VM is using a different logical processor than the one you're monitoring. Use the % Total Run Time counter with the VM instance, not the per-processor counters.
- Memory counters show 0: Dynamic memory counters require the VM to have dynamic memory enabled. Check the VM's settings in Hyper-V Manager.
- PowerShell command fails: Ensure you're running PowerShell as Administrator and that the Hyper-V module is installed (it is by default on Windows Server, but on Windows 10/11 you may need to enable the Hyper-V feature).
Frequently Asked Questions
What is the best built-in tool for Hyper-V performance monitoring?
Performance Monitor (perfmon.exe) is the most detailed built-in tool. It gives you granular counters for CPU, memory, disk, and network per VM. For quick checks, Task Manager and Hyper-V Manager are faster but less detailed.
How do I see CPU usage per virtual machine?
Open Performance Monitor, add the counter Hyper-V Hypervisor Virtual Processor → % Total Run Time, and select the VM instance. Alternatively, use PowerShell: Get-VM | Select Name, CPUUsage.
What does Memory Demand mean in Hyper-V?
Memory Demand is the amount of memory the guest OS is actively using. If it's consistently higher than the assigned memory, you may need to increase the VM's memory allocation.
Can I monitor Hyper-V VMs from inside the guest OS?
Yes, you can run Performance Monitor or Task Manager inside the guest, but they show the guest's view, not the host's allocation. For host-level metrics like CPU steal or memory pressure, use the host's Hyper-V counters.
How do I set up alerts for high CPU usage?
Use Performance Monitor's Data Collector Sets with a Performance Counter Alert. Right-click your data collector set, choose Properties, go to the Alerts tab, and set a threshold. You can also use PowerShell to schedule a script that checks Get-VM CPUUsage.
Why does a VM show high CPU usage in Task Manager but low in Hyper-V Manager?
Hyper-V Manager's CPU Usage column shows the VM's usage as a percentage of the host's total CPU. If the host has many cores, a VM using one full core might show as a low percentage. Use Performance Monitor's % Total Run Time for the VM's actual usage relative to its virtual processors.