Hyper-V virtual machine over WinRM (win_hyperv_vm)
Reads one virtual machine from its Hyper-V host over WinRM or native WMI, with no agent in the guest: whether it is running, its health, how long it has run, the load of its virtual processors, the memory it has, the heartbeat from its integration services, and the health of its replication when replication is set up. The machine is found by name, so moving its files does not break the sensor.
Transport. Under a Windows probe the device can be set to read this sensor over native WMI instead of WinRM; the queries and the result are the same. The target is then set up as in the WMI setup guide instead.
What it looks like

The sensor's page after a few polls, watching a small Linux guest on a Windows Server Hyper-V host. In the dark theme: the sensor's page. The form for adding it: light, dark.
Channels
| Key | Name | Unit | Default limits |
|---|---|---|---|
vmms_state | Management service (vmms) | Stopped is Down | |
state | State | Running is Up; every transitional state, paused and saved are warnings; off is neutral | |
health | Health | OK is Up, major and critical failure are Down | |
uptime_s | Uptime | s | none |
cpu_pct | CPU | % | warning above 90 |
mem_assigned_mb | Memory assigned | MB | none |
mem_used_pct | Memory used by the guest | % | warning above 90, error above 97 |
mem_pressure_pct | Memory pressure | % | none |
heartbeat | Heartbeat | Answering is Up, no contact is a warning, lost communication is Down | |
replication_health | Replication health | Normal is Up, warning is a warning, critical is Down; 0 is "not replicated" | |
replication_age_s | Time since last replication | s | warning above 1 hour, error above 24 hours |
What makes the sensor Down. Unless expect_running is turned off, a machine that is off or saved is Down and one in a transitional state (starting, stopping, pausing, taking a snapshot) or paused is a warning. A health that Hyper-V rates a major or critical failure is Down, any other health that is not OK a warning. With expect_heartbeat on, a running machine whose integration services do not answer is a warning and one that stopped answering is Down. Critical replication is Down.
A machine that is not running has no readings. Uptime, load, memory and heartbeat are unknown for a machine that is off, not zero: Hyper-V keeps no processor counters, memory or heartbeat component for it.
The heartbeat. It is the Msvm_HeartbeatComponent of the machine, which its integration services keep answering. A machine just started shows "No contact" until its services are up, which takes seconds to a minute, so a poll in that window is a warning. A guest with no integration services (an old or unusual operating system) never has a heartbeat; turn expect_heartbeat off for it, and the channel keeps showing the truth without rating it.
Memory. mem_assigned_mb is what the host has given the machine now (with dynamic memory it moves). The share used by the guest, and the pressure, come from the dynamic memory counters, which exist for every machine whether or not dynamic memory is on, and need the guest's integration services to report what is free; a guest that does not leaves them unknown.
Load. The mean of the run time of the machine's virtual processors in the hypervisor's counters, between two polls: unknown for the first poll, after the host restarts and when a processor's counter went backwards.
Replication. When replication is not set up, replication_health is 0 ("not replicated") and the age is unknown. When it is, the health is Hyper-V's own (normal, warning, critical) and the age is the time since the last replication by the host's own clock.
Parameters
| Parameter | Default | Meaning |
|---|---|---|
vm | required | The machine, by the name Hyper-V Manager shows or by its identifier (a GUID). Case does not matter. |
expect_running | true | The sensor is Down when the machine is not running. Turn it off for a machine that is meant to be off. |
expect_heartbeat | true | Rate a missing or lost heartbeat. Turn it off for a guest with no integration services. |
port | 5985, or 5986 with https | TCP port of the WinRM listener. |
https | false | Use the HTTPS listener instead of HTTP with message encryption. |
accept_self_signed | false | Accept an HTTPS certificate that cannot be verified. The credential has the same switch; either one is enough. |
Suggested interval: 60 seconds. Credential: Windows, on the Hyper-V host. Discovery proposes one sensor for each machine the host lists (VM web1), selected when the machine is running; a machine that is off is listed, not selected, and gets expect_running off so that it does not page for being parked. It works like the VMware expansion, through the template's windows_hyperv_vms expansion.
Where the data comes from
| Channel | Source |
|---|---|
state, health, uptime_s, replication_health, replication_age_s | The machine's row in Msvm_ComputerSystem (EnabledState, HealthState, OnTimeInMilliseconds, ReplicationHealth, LastReplicationTime), in root\virtualization\v2. |
heartbeat | Msvm_HeartbeatComponent, the row whose SystemName is the machine's identifier. |
cpu_pct | Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor, the instances named <machine>:Hv VP <n>, raw. |
mem_assigned_mb, mem_used_pct, mem_pressure_pct | Win32_PerfRawData_BalancerStats_HyperVDynamicMemoryVM, with Msvm_Memory for the size when the counters are missing. |
On the target and failures
As for the host sensor. Specific to this sensor:
| Message | Meaning |
|---|---|
the host has no virtual machine named X (it lists ...) (kind config) | The name or identifier is not one of the host's machines; the message lists up to ten that are. |
there is no Hyper-V Virtual Machine Management service (vmms) on the target, so the Hyper-V role is not installed (kind config) | The sensor was put on a machine without the role. |
Verification
Checked against WS-Man responses recorded from a real Windows Server 2022 Hyper-V host running one small Linux guest, with the guest running and turned off (the processor counters read twice), and against that host live over NTLM with message encryption: the guest running, the guest turned off and the same sensor set not to expect it running, and the guest started again (its heartbeat read "No contact" for the first seconds and then "OK"). The failed health, lost heartbeat, transitional states and replication are written by hand: no machine on the lab host was unhealthy and replication was not set up, so the status codes for them come from the provider's documentation. Not seen: dynamic memory with a guest that reports pressure, a Windows guest, a clustered host, replication, snapshots, and a non-administrator account.
Live tests are described on the host page.