Skip to content

Suggestion: Use defaultVhdSize and add defaultVhdType to .wslconfig #13529

@greengorych

Description

@greengorych

I would like to propose changing the logic of WSL 2 commands and adding a VHD disk type setting.

To create a WSL 2 instance with a fixed disk size, the size must always be specified with --vhd-size, even if .wslconfig already contains a defaultVhdSize setting:

[wsl2]
defaultVhdSize=10GB

Example command:

wsl --install Ubuntu-24.04 --vhd-size 10GB --fixed-vhd

The logical thing to do would be to use the defaultVhdSize setting from .wslconfig and simplify the command to:

wsl --install Ubuntu-24.04 --fixed-vhd

It might also be a good idea to make a setting in .wslconfig, for example:

[wsl2]
defaultVhdType=fixed | dynamic

This would allow creating new instances with the desired disk type and size using just:

wsl --install Ubuntu-24.04 

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions