Hello BlackJack,
This memory leak happens because the Windows host aggressively caches the virtual disk operations of Hyper-V containers in the system file cache, and it does not release them even after the containers are destroyed. To force Windows to reclaim this memory during your automated runs, you can use the command-line version of RAMMap from Sysinternals with the argument rammap.exe -empty to flush the standby list.
Alternatively, you can run a PowerShell script that calls the native Windows API SetSystemFileCacheSize to instantly trim the system working set and release the cached container files. This will safely free up the host memory without requiring a reboot or disrupting your scaling tests. Please try adding this cleanup step to your pipeline and let me know if it stabilizes the resource usage. If this solves the issue, please accept the answer so other community members can find it easily.
Tracy Le.