Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WSL Settings: Default VHD-Size is way too high #12531

Open
1 of 2 tasks
dskbrd opened this issue Jan 31, 2025 · 8 comments
Open
1 of 2 tasks

WSL Settings: Default VHD-Size is way too high #12531

dskbrd opened this issue Jan 31, 2025 · 8 comments

Comments

@dskbrd
Copy link

dskbrd commented Jan 31, 2025

Windows Version

Microsoft Windows [Version 10.0.22631.4751]

WSL Version

2.4.9.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.15.167.4-1

Distro Version

Debian, Ubuntu, any

Other Software

Docker Desktop for Windows v4.37.1

Repro Steps

Start or install any WSL distribution

Expected Behavior

WSL should work and allow me to install & access it's features

Actual Behavior

Since today docker stopped working with the error message:

deploying WSL2 distributions
ensuring main distro is deployed: deploying "docker-desktop": importing WSL distro "The parameter is incorrect. \r\nError code: Wsl/Service/RegisterDistro/E_INVALIDARG\r\n" output="docker-desktop": exit code: 4294967295: running WSL command wsl.exe C:\WINDOWS\System32\wsl.exe --import docker-desktop <HOME>\AppData\Local\Docker\wsl\main C:\Program Files\Docker\Docker\resources\wsl\wsl-bootstrap.tar --version 2: The parameter is incorrect. 
Error code: Wsl/Service/RegisterDistro/E_INVALIDARG
: exit status 0xffffffff
checking if isocache exists: CreateFile \\wsl$\docker-desktop-data\isocache\: The network name cannot be found.

Trying to start any WSL distro manually resulted in this error:

WslRegisterDistribution failed with error: 0x80070057
Error: 0x80070057 The parameter is incorrect.

I already tried:

It always ends with this error:

> wsl --install Debian
Debian GNU/Linux is already installed.
Launching Debian GNU/Linux...
Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x80070057
Error: 0x80070057 The parameter is incorrect.

Press any key to continue...
The requested operation is successful. Changes will not be effective until the system is rebooted.

Despite the message nothing works, even after reboot.

Diagnostic Logs

Contains first the call of wsl --install Debian and afterwards also trying to start Docker Desktop:

WslLogs-2025-01-31_16-30-57.zip

Copy link

View similar issues

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

Diagnostic information
.wslconfig found
Detected appx version: 2.4.8.0
Detected user visible error: Wsl/WSL_E_DEFAULT_DISTRO_NOT_FOUND
Detected user visible error: Wsl/Service/RegisterDistro/E_INVALIDARG
Detected user visible error: Wsl/WSL_E_DEFAULT_DISTRO_NOT_FOUND

@OneBlue
Copy link
Collaborator

OneBlue commented Feb 1, 2025

Thank you for reporting this @dskbrd. Looking through the logs, the root cause for failure is the same:

185	False	Microsoft.Windows.HyperV.VhdmpTrace	VhdmpTrace	0	01-31-2025 07:33:55.568	"	"	"Line: 	3299
Message: 	(file 'C:\Users\mihofmann\AppData\Local\Docker\wsl\main\ext4.vhdx')Failed to open backing file: 0xc0000043
Source: 	VhdmpiOpenBackingFileWithOptions"				7176	24096	2		00000000-0000-0000-0000-000000000000		

This error code is STATUS_SHARING_VIOLATION, meaning that someone else is locking this file. Does this file already exist on your machine "'C:\Users\mihofmann\AppData\Local\Docker\wsl\main\ext4.vhdx" ? And if so, is mounted anywhere, or is any other program trying to access it ?

@dskbrd
Copy link
Author

dskbrd commented Feb 3, 2025

At least after reinstalling Docker, the file does not exist anymore.
Here is a more up-to-date log in the current state of my system.
It includes three different cases:

  • 11:28:24: wsl --install Debian
    Produces Output (Debian is already installed):
Debian GNU/Linux is already installed.
Launching Debian GNU/Linux...
Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x80070057
Error: 0x80070057 The parameter is incorrect.

Press any key to continue...
The requested operation is successful. Changes will not be effective until the system is rebooted.
  • 11:29:42: wsl --install Ubuntu
    Downloads Ubuntu, then produces Output:
Downloading: Ubuntu
Installing: Ubuntu
The parameter is incorrect.
Error code: Wsl/InstallDistro/Service/RegisterDistro/E_INVALIDARG
  • 11:29:50: Starting/Opening "Debian" from the Start Menu
    Opens a new Powershell window and produces:
Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x80070057
Error: 0x80070057 The parameter is incorrect.

Press any key to continue...

From the logs I see that it is trying to create or open VHD volumes in different places:

  • \AppData\Local\Packages\TheDebianProject.DebianGNULinux_76v4gfsz19hv4\LocalState\ext4.vhdx
  • \AppData\Local\wsl\{11d20db3-0e39-4729-9363-436acb233d7a}\ext4.vhdx

I checked and none of these Files exist.
I hope this helps to identify the problem.

WslLogs-2025-02-03_11-28-10.zip

Copy link

github-actions bot commented Feb 3, 2025

Diagnostic information
.wslconfig found
Detected appx version: 2.4.9.0
optional-components.txt not found
Detected user visible error: Wsl/InstallDistro/Service/RegisterDistro/E_INVALIDARG

@dskbrd
Copy link
Author

dskbrd commented Feb 3, 2025

It looks like the root cause is always from VHDMP: Failed to Create VHD \AppData\Local\Packages\CanonicalGroupLimited.Ubuntu_79rhkp1fndgsc\LocalState\ext4.vhdx. Error status 0xC000000D.
But I have no idea what could cause this...

@dskbrd
Copy link
Author

dskbrd commented Feb 3, 2025

Eureka!

I found the issue.
Somehow the default VHD-Size in "WSL Settings" is about 1000GB:

Image

This is more than the free space I have available so that's probably causing the problems.
I have no idea why this is the default value but changing it to something more sensible fixed my problems.

@dskbrd dskbrd changed the title WSL suddenly stopped working completely WSL Settings: Default VHD-Size is way too high Feb 3, 2025
Copy link

github-actions bot commented Feb 3, 2025

View similar issues

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

Diagnostic information
.wslconfig found
Detected appx version: 2.4.8.0
Detected user visible error: Wsl/WSL_E_DEFAULT_DISTRO_NOT_FOUND
Detected user visible error: Wsl/Service/RegisterDistro/E_INVALIDARG
Detected user visible error: Wsl/WSL_E_DEFAULT_DISTRO_NOT_FOUND

@DarkVamp
Copy link

DarkVamp commented Feb 4, 2025

Eureka!

I found the issue. Somehow the default VHD-Size in "WSL Settings" is about 1000GB:

Image

This is more than the free space I have available so that's probably causing the problems. I have no idea why this is the default value but changing it to something more sensible fixed my problems.

I uninstalled DOCKER

But can't start DOCKER now (after reinstalling) because WSL2 is not responding :-(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants