Virtual Machine Manager Hyper-V VM Memory Pressure

ProHostVMMemoryPressureUnitMonitor (UnitMonitor)

This is a unit monitor to check if memory demand on a particular virtual machine exceeds the assigned memory by a certain percentage.

Knowledge Base article:

Summary

This monitor tracks the memory pressure of Hyper-V virtual machines and generates an alert should the pressure exceed a user-defined threshold. The default thresholds are 80% (warning) and 100% (error).

Causes

The memory pressure of the virtual machine has exceeded the defined threshold.

Resolutions

Either migrate the virtual machine or adjust the target memory pressure of the virtual machine to alleviate this condition.

Element properties:

TargetMicrosoft.SystemCenter.VirtualMachineManager.PRO.V2.ManagedHost.HyperV
Parent MonitorSystem.Health.PerformanceState
CategoryCustom
EnabledFalse
Alert GenerateTrue
Alert SeverityMatchMonitorHealth
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.SystemCenter.VirtualMachineManager.PRO.VMPressure
RemotableTrue
AccessibilityPublic
Alert Message
PRO Hyper-V VM Memory Pressure
Memory demand is {0}\% of the assigned memory and has exceeded the critical or warning levels for {1}.
RunAsDefault

Source Code:

<UnitMonitor ID="ProHostVMMemoryPressureUnitMonitor" Accessibility="Public" Enabled="false" Target="Microsoft.SystemCenter.VirtualMachineManager.PRO.V2.ManagedHost.HyperV" ParentMonitorID="Health!System.Health.PerformanceState" Remotable="true" Priority="Normal" TypeID="Microsoft.SystemCenter.VirtualMachineManager.PRO.VMPressure" ConfirmDelivery="false">
<Category>Custom</Category>
<AlertSettings AlertMessage="ProHostVMMemoryPressureUnitMonitor_AlertMessageResourceID">
<AlertOnState>Warning</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>MatchMonitorHealth</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Data/Context/SampleValue$</AlertParameter1>
<AlertParameter2>$Data/Context/InstanceName$</AlertParameter2>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="VMMemoryPressureUnitMonitor_StateSuccess" MonitorTypeStateID="ConditionSuccess" HealthState="Success"/>
<OperationalState ID="VMMemoryPressureUnitMonitor_StateWarning" MonitorTypeStateID="ConditionWarn" HealthState="Warning"/>
<OperationalState ID="VMMemoryPressureUnitMonitor_StateError" MonitorTypeStateID="ConditionError" HealthState="Error"/>
</OperationalStates>
<Configuration>
<IntervalSeconds>300</IntervalSeconds>
<VMNames>$Target/Property[Type="Microsoft.SystemCenter.VirtualMachineManager.PRO.V2.ManagedHost.HyperV"]/VMNames$</VMNames>
<WarningThreshold>80</WarningThreshold>
<ErrorThreshold>100</ErrorThreshold>
<ConsecutiveSamples>3</ConsecutiveSamples>
<DynamicMemoryVMs>false</DynamicMemoryVMs>
</Configuration>
</UnitMonitor>