虛擬硬碟可用磁碟空間

Microsoft.Windows.HyperV.VirtualDrive.FreeSpaceMonitor (UnitMonitor)

監視虛擬硬碟的可用邏輯磁碟空間。

Knowledge Base article:

摘要

此監視器追蹤內含動態擴充或差異虛擬硬碟之邏輯伺服器上的可用磁碟空間大小。

其依據可重新設定的「警告狀態磁碟空間」和「錯誤狀態磁碟空間」參數值來變更狀態。「警告」和「錯誤」狀態的預設值分別為 2 GB 及 200 MB。若可用磁碟空間小於 200 MB,Hyper-V 將暫停虛擬機器。

原因

此監視器產生的狀態如下:

解決方式

Element properties:

TargetMicrosoft.Windows.HyperV.Discovery.VirtualDrive
Parent MonitorSystem.Health.AvailabilityState
CategoryStateCollection
EnabledTrue
Alert GenerateFalse
Alert Auto ResolveTrue
Monitor TypeMicrosoft.Windows.HyperV.DiskFreeSpaceMonitorType
RemotableTrue
AccessibilityPublic
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.Windows.HyperV.VirtualDrive.FreeSpaceMonitor" Accessibility="Public" Enabled="onEssentialMonitoring" Target="HVDisc!Microsoft.Windows.HyperV.Discovery.VirtualDrive" ParentMonitorID="Health!System.Health.AvailabilityState" Remotable="true" Priority="Normal" TypeID="HVLib!Microsoft.Windows.HyperV.DiskFreeSpaceMonitorType" ConfirmDelivery="false">
<Category>StateCollection</Category>
<OperationalStates>
<OperationalState ID="EnoughSpace" MonitorTypeStateID="FreeSpaceAvailable" HealthState="Success"/>
<OperationalState ID="PartialSpace" MonitorTypeStateID="PartialSpaceAvailable" HealthState="Warning"/>
<OperationalState ID="NoSpace" MonitorTypeStateID="NoSpaceAvailable" HealthState="Error"/>
</OperationalStates>
<Configuration>
<VirtualDriveId>$Target/Property[Type="HVLib!Microsoft.Windows.HyperV.VirtualHardwareComponent"]/DeviceId$</VirtualDriveId>
<WarningSize>2048</WarningSize>
<ErrorSize>200</ErrorSize>
</Configuration>
</UnitMonitor>