Skip to content

Docker Desktop - WSL update failed #14022

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

Open
Da-Bayer opened this issue Apr 17, 2024 · 118 comments
Open

Docker Desktop - WSL update failed #14022

Da-Bayer opened this issue Apr 17, 2024 · 118 comments

Comments

@Da-Bayer
Copy link

Da-Bayer commented Apr 17, 2024

Description

wsl update failed: update failed: updating wsl: exit code: 4294967295: running WSL command wsl.exe C:\WINDOWS\System32\wsl.exe --update --web-download: Downloading: Windows Subsystem for Linux

The requested operation requires elevation.

: exit status 0xffffffff

Reproduce

  1. Run update docker desktop to version 4.29.0
  2. Finish setting up Docker Desktop - Use recommended setting (requires adminostrator password) -> Finish

Expected behavior

Docker desktop start correctly.

docker version

Client:
 Cloud integration: v1.0.35+desktop.13
 Version:           26.0.0
 API version:       1.45
 Go version:        go1.21.8
 Git commit:        2ae903e
 Built:             Wed Mar 20 15:18:56 2024
 OS/Arch:           windows/amd64
 Context:           default

docker info

Client:
 Version:    26.0.0
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.13.1-desktop.1
    Path:     C:\Program Files\Docker\cli-plugins\docker-buildx.exe
  compose: Docker Compose (Docker Inc.)
    Version:  v2.26.1-desktop.1
    Path:     C:\Program Files\Docker\cli-plugins\docker-compose.exe
  debug: Get a shell into any image or container. (Docker Inc.)
    Version:  0.0.27
    Path:     C:\Program Files\Docker\cli-plugins\docker-debug.exe
  dev: Docker Dev Environments (Docker Inc.)
    Version:  v0.1.2
    Path:     C:\Program Files\Docker\cli-plugins\docker-dev.exe
  extension: Manages Docker extensions (Docker Inc.)
    Version:  v0.2.23
    Path:     C:\Program Files\Docker\cli-plugins\docker-extension.exe
  feedback: Provide feedback, right in your terminal! (Docker Inc.)
    Version:  v1.0.4
    Path:     C:\Program Files\Docker\cli-plugins\docker-feedback.exe
  init: Creates Docker-related starter files for your project (Docker Inc.)
    Version:  v1.1.0
    Path:     C:\Program Files\Docker\cli-plugins\docker-init.exe
  sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc.)
    Version:  0.6.0
    Path:     C:\Program Files\Docker\cli-plugins\docker-sbom.exe
  scout: Docker Scout (Docker Inc.)
    Version:  v1.6.3
    Path:     C:\Program Files\Docker\cli-plugins\docker-scout.exe

Server:
ERROR: request returned Internal Server Error for API route and version http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.45/info, check if the server supports the requested API version
errors pretty printing info

Diagnostics ID

38B1FB20-5B09-490A-A484-255D42B5973B/20240417053402

@guelzow
Copy link

guelzow commented Apr 19, 2024

Hi everyone.

Another diagnostics ID
092845CE-A5A5-46DB-9940-D74EC4092151/20240419053944

Workaround:
Start Docker with administrator rights.

More Info:
The update to 4.29 deleted all images.
I do not login with an administrator account.

Tobi

@thien7156329
Copy link

microsoft/WSL#9157
I run success with issue WSL update failed . Let's install KB5020030 file
https://www.catalog.update.microsoft.com/Search.aspx?q=KB5020030

@minhruhr
Copy link

Same issue here. version 4.29.0 always tries to update my wsl although it's already on the latest version when I try to do it manually.

wsl update failed: update failed: updating wsl: exit code: 4294967295: running WSL command wsl.exe C:\WINDOWS\System32\wsl.exe --update --web-download: Downloading: Windows Subsystem for Linux
The requested operation requires elevation.
: exit status 0xffffffff

uninstalling and reinstalling 4.28.0 works again. But I can't seem to be able to update to 4.29.0

Disgnostic ID:

E440D448-382B-4F34-BEE3-C1D2FB5E0345/20240419121414

@jonaskohl
Copy link

Also happens on my end: 640FC6CF-9D49-480B-84CC-C8CF71D41B41/20240422071529

@Villad-dev
Copy link

Villad-dev commented Apr 22, 2024

I had the same problem solution below:
SOLVED: Reinstall Docker ver. 4.28.0 with preinstalled Ubuntu from Microsoft Store
image

@bl0000
Copy link

bl0000 commented Apr 22, 2024

Can confirm downgrading to 4.28 has fixed the issue for me too.

@tjk19
Copy link

tjk19 commented Apr 22, 2024

Same issue as well Windows 10
error wsl update failed: update failed: updating wsl: exit code: 4294967295:
Discovered even though I had to install Docker Desktop 4.29.0 (145265) with admin rights and Docker Desktop was prompting to update wsl with admin privilidges.
The solution was simple.
Run wsl.exe --update from a cmd prompt that was not elevated.
Things that make you go Hmmmm

@duckodei
Copy link

@minhruhr @Villad-dev @bl0000 where i can get 4.28.0 installer to download, can you give me the link or attach your file installer
Thank you a lots <3

@bl0000
Copy link

bl0000 commented Apr 23, 2024

@duckodei https://docs.docker.com/desktop/release-notes/

Scroll down to 4.28.0.0, click Windows.

@sbanoeon
Copy link

sbanoeon commented Apr 23, 2024

Same problem for me. Even though WSL is already updated to latest version. Diagnostic ID: A8FBCE60-CB47-4FBE-811B-CA75083CA43B/20240423084432

@prashsamosa
Copy link

Getting same error please fix this

@ShamaGlob
Copy link

have this issue, can't fix it even with 4.28 ver. any ideas?

@duckodei
Copy link

@bl0000 I tried, but that show check sum, not any installer file to download.
Do I make any mistake here, or can we have a way to use check sum to adjust the version when running the installer?
image
image

@sbanoeon
Copy link

@duckodei did you click on checksum or on Windows? When you click on Windows, it directly downloads the installer.

@duckodei
Copy link

@sbanoeon oh thanks a lot, i clicked checksum, my mistake.
Let me try to install again

@prashsamosa
Copy link

@sbanoeon oh thanks a lot, i clicked checksum, my mistake.
Let me try to install again
Just click on the windows option buddy it will start downloading we have to use this version until they fix this issue

@duckodei
Copy link

duckodei commented Apr 24, 2024

I tried installing version 4.28 & 4.27.2 also but there seems to be a problem, have you encountered it?
@sbanoeon @Prashant20nov2003
image

@chelpingstinetrill
Copy link

Seeing the same issue here. Windows 10 machines, non-admin accounts. Downgrades to 4.28 allow the engine to start again.

Also, running wsl.exe --update --web-download from an unelevated command prompt Then if open, closing out and opening up Docker for Windows worked, even though wsl reported that it was already at the latest version.

Similar to what tjk19 suggested #14022 (comment)

Diagnostic ID: 33CED035-C391-46A4-8B96-9D06B5AD557C

@chelnak
Copy link

chelnak commented Apr 24, 2024

Hey everyone 👋 ,

I'm taking a look at this issue.

From the diagnostics provided, the common theme is that the non-elevated check errors out with:

Windows Subsystem for Linux
The requested operation requires elevation.: exit status 0xffffffff

This feels odd, given that in all cases I see that the elevated update completes right before.

I also noticed that none of the diagnostics contained a log for com.docker.admin.exe, which is where we may see clues about what is happening with the elevated update.

Could I ask you to check your logs directory, and let me know if it's present?

It would be here:

C:\Users\<user>\AppData\Local\Docker\log\host\

@chelpingstinetrill I will take a look at your diagnostic right now.

@chelpingstinetrill
Copy link

@chelnak that is not present on my regular user account but is present on my admin account.

@chelnak
Copy link

chelnak commented Apr 24, 2024

@chelpingstinetrill Great! I can see it included in your diagnostics bundle which is really helpful. I can see that WSL gets updated successfully inside the elevated process.

I have a few questions for you if that is OK.

  • Did you install Docker Desktop while logged in as an administrator account?
  • Did you run Docker Desktop while logged in as an administrator?
  • Did you then log in with your non-administrator account?
  • Does your non-administrator account have any local admin / UAC rights?

Appreciate your time, thank you!

@minhruhr
Copy link

minhruhr commented Apr 24, 2024

@chelnak
WSL is correctly updated in my log file
-------------------------------------------------------------------------------->8 -------------------------------------------------------------------------------->8 [2024-04-24T07:05:26.035077800Z][com.docker.admin.exe.update][I] WSL Updater: updating wsl with -> wsl.exe --update --web-download [2024-04-24T07:05:36.538551100Z][com.docker.admin.exe.update][I] WSL Updater: update completed successfully: Checking for updates. The most recent version of Windows Subsystem for Linux is already installed.

If I may answer to your questions, in my case

  • I did not install Docker Desktop while logged in as an admin account (although the installation always prompts and ask for admin right to proceed)
  • Running Docker Desktop without admin right doesn't work with v 4.29.0 (it's fine with 4.28.0) as it keeps asking for WSL to be updated
  • Running Docker Desktop as Administrator doesn't have that issue, but I believe it's using the configuration from the admin user and not the user I'm currently logged in. This is not an option. all my docker images aren't visible while running as administrator.
  • the non-administrator account does not have admin rights

@chelpingstinetrill
Copy link

@chelnak

Did you install Docker Desktop while logged in as an administrator account?
It is installed/updated via Intune it uses the SYSTEM acount.

Did you run Docker Desktop while logged in as an administrator?
Initial run/fail was with non-admin account.
I then tried with admin account for troubleshooting and it ran successfully.

Did you then log in with your non-administrator account?
Please see above.

Does your non-administrator account have any local admin / UAC rights?
No local admin/UAC for non-admin account.

@chelnak
Copy link

chelnak commented Apr 24, 2024

@minhruhr @chelpingstinetrill thank you both for the responses. They will be really useful for building a repro of the issue.

@Rishikesh-atal
Copy link

I see this message..as shown below:

Docker Desktop - WSL update failed

wsl update failed: update failed: updating wsl: exit code: 1: running WSL command wsl.exe C:\Windows\System32\wsl.exe --update --web-download: : exit status 1

Diagnostics ID is E4DDC3FC-415C-4FF4-9BE1-5DC1E320ADEA/20240425112407

Please help what to do

@raimondsL
Copy link

Removing .32 because POS nothing works! Back to .28

@dtlhlbs
Copy link

dtlhlbs commented Jul 24, 2024

Uninstalled Docker Desktop
Uninstalled all WSL distributions
Updated WSL (wsl --update)
Downloaded and installed Docker Desktop 4.32
Ran installer
It was fine until I chose to Switch to Linux containers..., then the error shown.

Note
The wsl.exe --update --web-download command shown in the error screen is NOT a valid command. Running this in the console just returns the usage message.

image

Diagnostics ID:

7E0DDE57-3ECD-4BB8-8421-2E479B691460/20240724022212

@skavem
Copy link

skavem commented Jul 25, 2024

Was struggling with this too. What's helped is getting latest windows 10 updates. They were restricted by company's policies, manual updating helped. Then installed docker desktop 4.32

@Moachi
Copy link

Moachi commented Jul 30, 2024

I think it might be related to the enabled "Legacy Console Mode". I had the same issue, once disabled it the issue disappeared.

@csckcac
Copy link

csckcac commented Jul 31, 2024

This is crazy, I just shutdown wsl and restart docker desktop, my docker desktop automatically update with the same issue. (Actually I turn off all docker update, so I don't know why this happen)
Also windows update is blocked by company policy. Please don't force us to do any update.

For your reference, you need to install windows Cumulative Update Preview, you can do it my WIndows Update or manually (shown as below)

  1. Download latest stable wsl x64 msi in https://github.com/microsoft/WSL/releases Assets
  2. Install the msi file
  3. Open cmd, type winver, check the os build version
  4. The following assume your os build is 21H2
    1. Go https://www.catalog.update.microsoft.com/Search.aspx , search Cumulative Update Preview for Windows 10 Version 21H2 for x64-based Systems, download the latest version, you will get a file like windows10.0-kb5023773-x64_ffdee74386dcaeae70e92fe841aa3d37f58c68a6.msu
    2. Open cmd
    3. mkdir C:\Temp\kb5023773
    4. Expand –F:* Downloads\windows10.0-kb5023773-x64_ffdee74386dcaeae70e92fe841aa3d37f58c68a6.msu C:\Temp\kb5023773
    5. DISM.exe /Online /Add-Package /PackagePath:C:\Temp\kb5023773\Windows10.0-KB5023773-x64.cab
    6. Restart PC

Verify WSL

wsl.exe --version
WSL version: 2.2.4.0
Kernel version: 5.15.153.1-2
WSLg version: 1.0.61
MSRDC version: 1.2.5326
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26091.1-240325-1447.ge-release
Windows version: 10.0.19045.4717

Ref: https://learn.microsoft.com/en-us/archive/blogs/askcore/how-to-use-dism-to-install-a-hotfix-from-within-windows

@dukhovnik-dev
Copy link

Downloading the latest x64 release from (https://github.com/microsoft/WSL/releases) helped resolve the issue on my system

thanks a lot! I had issue id D7A0C61D-D999-464F-8D7F-B41675CCA91B/20240801182754 and now it works great

@andylizf
Copy link

andylizf commented Aug 2, 2024

Customized kernels can also cause this problem. I changed back to the default kernel and the problem was solved.

@nick-wellinghoff
Copy link

Customized kernels can also cause this problem. I changed back to the default kernel and the problem was solved.

This was the issue for me. Changing the kernel back to default in .wslconfig solved the issue.

@kellyfire611
Copy link

@nick-wellinghoff can you share .wslconfig file bro?
I dont know what's version need to used? Thanks !

@nick-wellinghoff
Copy link

[wsl2]
memory=16GB

if you have a line that says "kernel=..." remove it.

@InspiringCode
Copy link

The problem in my case was, that the "Host Network Service" (hns) was not running. After setting it to "Auto Delayed" is worked for me. Installing the latest version at least gave me a better error message with more details.

@ryushinnn
Copy link

Downloading the latest x64 release from (https://github.com/microsoft/WSL/releases) helped resolve the issue on my system

struggled all night long and this solution worked for me. thank mate

@saturday06
Copy link

I had the same issue.

Disabling "Use the WSL 2 based engine" temporarily resolved the issue, as a workaround.

@longzheng
Copy link

longzheng commented Aug 18, 2024

I can also confirm downloading/installing 2.3.17 fixed it for me.

@kaushalsingh861
Copy link

microsoft/WSL#9157 I run success with issue WSL update failed . Let's install KB5020030 file https://www.catalog.update.microsoft.com/Search.aspx?q=KB5020030

This helped me for my Windows 10 machine

@ghost
Copy link

ghost commented Sep 6, 2024

Thanks, @andylizf @nick-wellinghoff !
I disabled IPv6 in my .wslconfig, because of previous bug in docker for desktop.

[wsl2]
kernelCommandLine=ipv6.disable=0

I removed this line and the error is gone.

@ThePlenkov
Copy link

HI! In our company we do not have admin rights by default. Because of that we have a following broken flow:

  • PC starts
  • Docker Desktop starts automatically
  • CUA window appears with offer to input pwd
  • I cannot enter pwd by that moment because i'm not an admin and press no
  • An error popup appears from DOcker saying that wsl --update is not possible
  • Docker desktop crashes and I have to run it manually

TO be honest this is just simply annoying, craziest thing is that I don;'t need admin access to run this commands from CLI, moreover I'd prefer that Docker doesn't control the version of my WSL. If you need to update it - do it during installing better.

Is it possible somehow to deactivate this feature?

Thanks!

@SebastianBandera
Copy link

microsoft/WSL#9157 I run success with issue WSL update failed . Let's install KB5020030 file https://www.catalog.update.microsoft.com/Search.aspx?q=KB5020030

It worked for me to install that update, thanks.

@adouz
Copy link

adouz commented Sep 13, 2024

downgrading from 4.34.2 to 4.28.0 in windows 11 fixed the issue for me

@Reza1290
Copy link

Manual Update WSL help me

https://github.com/microsoft/WSL/releases/tag/2.3.17 -> choose x64 or arm .msi

@niklastheiler
Copy link

Had the same problem, just entered "WSL" in the windows search bar and opened WSL. It looked like it had to make additional configurations. After that WSL was in Path and Docker (V.4.34.2) is runnning smoothly.

@Will1v
Copy link

Will1v commented Oct 2, 2024

Downgrading from 4.34.2 to 4.29.0 on Win11 fixed it for me too. (4.28.0 binary wasn't available for download anymore)

@inoue-773
Copy link

For those who lost access to 4.28.0, wayback machine got your back.
Even though Docker deleted the direct link of 4.28.0 installer from the release notes, the URL still works.
https://web.archive.org/web/20240417101831/https://desktop.docker.com/win/main/amd64/139021/Docker%20Desktop%20Installer.exe

@Buihaidang2k4
Copy link

Image
I have tried many ways and updated it to the latest version but it still says this

@LukeZhuohuiLi
Copy link

LukeZhuohuiLi commented Dec 12, 2024

I finally found an easy solution to this, uninstall docker and delete docker folder from

C:\Users{your user name}\AppData\Local\Docker
C:\Users{your user name}\AppData\Roaming\Docker

delete any folder related to docker and re-install it, it runs smooth

@Connor-yang96
Copy link

Diagnostic ID:
63F4896B-36D1-424D-B153-F3FCB3C017EB/20250112132629

@DJesseTaylor
Copy link

The option that worked for me was manually run the wsl.exe --update in an admin powershell window. Docker launched fine afterwards.

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

No branches or pull requests