Hacker News new | ask | show | jobs
by ZhiqiangWang 207 days ago
The issue I have is VHDX keeps expanding, and you need to manually compact it to claim disk back to host.
2 comments

You need to enable sparse VHD! However it doesn't alwyas trigger. I have moderate success with enabling TRIM systemd service on the distro.

Here is the tracking issue:

https://github.com/microsoft/WSL/issues/12103

And if nothing works you can still manually optimize.

https://superuser.com/questions/1827953/reclaim-wsl2-disk-sp...

I think there is an auto shrink feature, but it might cause more trouble than good.
cpu 100% and shitty integration.