Solution:
Root Cause: Recursive Block-Level Scanning of Monolithic Virtual Disk Images Virtualization hypervisors (Hyper-V, VMware Workstation, VirtualBox, WSL2, and Docker Desktop) continuously mutate multi-gigabyte monolithic disk containers (
.vhdx,
.vmdk,
.vdi,
.qcow2) via random-access block writes. Each time the hypervisor flushes dirty memory pages to the host filesystem,
WdFilter.sys flags the virtual disk file as modified. Because virtual disk files exceed standard in-memory cache thresholds,
MsMpEng.exe repeatedly parses internal archive headers and streams multi-gigabyte blocks into its scanning engine, pinning host CPU threads at 80%–100%.
Diagnostic Verification: Open Resource Monitor (resmon.exe), navigate to the Disk tab, and expand Disk Activity . Filter or sort by Image (MsMpEng.exe) and check the File column for active read throughput (B/sec) against .vhdx, .vmdk, or ext4.vhdx paths. Confirm via PowerShell whether virtual disk extensions are currently missing from Defender's exclusion list: Copy
powershell
Get-MpPreference | Select-Object ExclusionExtension, ExclusionPath
Step-by-Step Fix: 1 Exclude Virtual Disk File Extensions:
Execute the following command in an elevated PowerShell window to prevent block-level re-scanning of virtual hard disks: Copy
powershell
Add-MpPreference -ExclusionExtension "vhdx", "vhd", "vmdk", "vdi", "avhdx"
2 Exclude WSL2 and Docker Desktop Data Directories:
Add targeted folder exclusions for WSL2 distributions and Docker engine storage paths: Copy
powershell
Add-MpPreference -ExclusionPath "$env:LOCALAPPDATA\Packages", "$env:LOCALAPPDATA\Docker\wsl"
3 Exclude Hypervisor Worker Processes:
Add the Hyper-V Virtual Machine Worker Process (vmwp.exe) and WSL service host (wslservice.exe) to process exclusions: Copy
powershell
Add-MpPreference -ExclusionProcess "vmwp.exe", "wslservice.exe", "vmware-vmx.exe"
Prevention & Long-Term Monitoring: Maintain endpoint security inside guest virtual machines by running an independent antivirus agent within the guest OS, since host-level .vhdx exclusions bypass host inspection of guest payloads. Periodically compact WSL2 ext4.vhdx images using Optimize-VHD to reduce file fragmentation and metadata overhead.