Skip to content

Sparse VHD support is currently disabled due to potential data corruption. #13075

Closed

Description

@imjiaoyuan

Windows Version

Microsoft Windows [版本 10.0.19044.5854]

WSL Version

2.5.8.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

6.6.87.1-1

Distro Version

archlinux

Other Software

No response

Repro Steps

PS C:\Users\JiaoYuan> wsl --manage archlinux --set-sparse true

Expected Behavior

PS C:\Users\JiaoYuan> wsl --manage archlinux --set-sparse true
正在进行转换,这可能需要几分钟时间。
由于潜在的数据损坏,目前已禁用稀疏 VHD 支持。
若要强制分发使用稀疏 vhd,请运行:
wsl.exe --manage <DistributionName> --set-sparse --allow-unsafe
错误代码: Wsl/Service/E_INVALIDARG

Actual Behavior

PS C:\Users\JiaoYuan> wsl --manage archlinux --set-sparse true
正在进行转换,这可能需要几分钟时间。
由于潜在的数据损坏,目前已禁用稀疏 VHD 支持。
若要强制分发使用稀疏 vhd,请运行:
wsl.exe --manage <DistributionName> --set-sparse --allow-unsafe
错误代码: Wsl/Service/E_INVALIDARG
PS C:\Users\JiaoYuan> wsl.exe --manage archlinux --set-sparse --allow-unsafe
--allow-unsafe 不是有效的布尔值,<true|false>
错误代码: Wsl/E_INVALIDARG
PS C:\Users\JiaoYuan>

Diagnostic Logs

WslLogs-2025-06-09_14-32-16.zip

Activity

  1. github-actions commented on Jun 9, 2025

    @github-actions
    Contributor

    The log file doesn't contain any WSL traces. Please make sure that you reproduced the issue while the log collection was running.

    Diagnostic information
    .wslconfig found
    Detected appx version: 2.5.8.0
    Found no WSL traces in the logs
    
  2. OneBlue commented on Jun 9, 2025

    @OneBlue
    Collaborator

    jiaoyuan (@imjiaoyuan): The second command line is missing the true after the --set-sparse. This is the command line you need:

    wsl.exe --manage archlinux --set-sparse true --allow-unsafe
    
  3. imjiaoyuan commented on Jun 10, 2025

    @imjiaoyuan
    Author

    Blue (@OneBlue) Thank you for your answer, I made a stupid mistake!

  4. junhaoliao commented on Sep 23, 2025

    @junhaoliao
    Contributor

    Hi Blue (@OneBlue)

    I noticed this issue was closed, but the problem wasn't fully addressed. The key is that --set-sparse requires a boolean value (true or false) but the prompt omits that.

    I actually ran this command many times but ran into this today: I manually added true but had a typo in --allow-unsafe, which led me to search and find this issue. To prevent this confusion for others, I submitted a PR that properly adds the boolean value to the prompt.

    You can see the PR here: #13512

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions