microsoft / microsoft/WSL

Proposal: enable sparse mode by default

Open
#13,241 7 comments 0 reactions 0 assignees View on GitHub
feature
Dominant language
C++
Stars
33.7k
Forks
1.8k
Avg merge
3d 17h
Merged PRs (30d)
116

Description

**Is your feature request related to a problem? Please describe.**
Currently, WSL does not enable NTFS sparse file support by default for its virtual disk (ext4.vhdx). This leads to unnecessary disk space usage, especially when working with large development environments, package managers, or Docker images. Users must manually convert or recreate the VHDX in sparse mode to benefit from actual disk savings.

**Describe the solution you'd like**
Enable sparse mode by default when creating new WSL distributions or VHDX disks. This would ensure that unused or zeroed blocks inside the VHDX do not consume physical disk space unnecessarily. Ideally, this should be transparent to the user and require no additional setup.

**Describe alternatives you've considered**
`wsl --manage --set-sparse true --allow-unsafe`

**Additional context**
Sparse support can significantly reduce the disk footprint for users working with data-heavy tools like Docker, compilers, and large codebases. As SSDs remain relatively expensive and WSL is used heavily in developer workflows, enabling sparse mode by default would be a smart default.

Contributor guide

Open the contributing guide

Research direction

The issue names no files, tests, or entry points. Start by tracing how new WSL distributions and VHDX disks are created, then compare that path with `wsl --manage --set-sparse true --allow-unsafe`. Done means new distributions or disks use sparse mode by default without additional user setup, with coverage for the creation behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, linux
Domain
operating-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.