Open rnertney opened 1 year ago
I've made a little bit of progress, I think?
I found there was an install of Kali Linux in my WSL and I have no idea how long it was there. I uninstalled it and installed Ubuntu, but now running the wsl command results in this message:
`Windows Subsystem for Linux has no installed distributions.
Use 'wsl.exe --list --online' to list available distributions
and 'wsl.exe --install
Distributions can also be installed by visiting the Microsoft Store: https://aka.ms/wslstore Error code: Wsl/Service/CreateInstance/GetDefaultDistro/WSL_E_DEFAULT_DISTRO_NOT_FOUND`
I've tried reinstalling Ubuntu, from both the Microsoft store and by using wsl --install but I'm still getting the same result. Opening the Ubuntu app in my Start Menu I get this:
Installing, this may take a few minutes... WslRegisterDistribution failed with error: 0x80370102 Please enable the Virtual Machine Platform Windows feature and ensure virtualization is enabled in the BIOS. For information please visit https://aka.ms/enablevirtualization Press any key to continue...
and Docker, which is what I'm ultimately trying to set up here, throws these errors:
Docker.Core.HttpBadResponseException: {"message":"2 errors occurred:\n\t provisioning docker WSL distros: deploying \"docker-desktop\": importing WSL distro \"docker-desktop\": deploying WSL distro \"docker-desktop\" (\"C:\\Program Files\\Docker\\Docker\\resources\\wsl\\wsl-bootstrap.tar\" -\u003e \"C:\\Users\\SirDarwin\\AppData\\Local\\Docker\\wsl\\distro\"): exit status 0xffffffff\n\t checking if isocache exists: CreateFile \\wsl$\docker-desktop-data\isocache\: The network name cannot be found.\n\n"}
at Docker.Core.GoBackend.GoBackendClient.
I've been talking with a few people about this and apparently this means it can't find an install of WSL. So with all in this in mind, it seems WSL is still not working for me.
Another way to run Docker would be in a virtual machine, but not even those are working for me anymore. I have tried both Hyper-V and VMWare.
If I were unable to find a solution here or anywhere else, my only option would be to reinstall Windows which I'm avoiding at all costs.
It may be a good idea for you to check your installed distros if you haven't already, with wsl --list or --list --verbose, uninstall any you find and see how WSL behaves afterwards.
Edit: Also, I can't seem to tell if I'm on WSL 1 or 2. I tried setting the default version to 1 just to try, then disabling and re-enabling WSL in my Windows features, but I decided to go back to 2, did the same thing, and this is my version info:
WSL version: 1.0.3.0 Kernel version: 5.15.79.1 WSLg version: 1.0.47 MSRDC version: 1.2.3575 Direct3D version: 1.606.4 DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp Windows version: 10.0.19045.2604
I also have the same issue. When this problem occurred, both my Windows Sandbox and WSL2 stopped working properly. Then I found an article about fixing the Sandbox and resolved the issue by following these steps:
Uninstall Windows Sandbox.
Restart your computer.
Open Command Prompt (Run as administrator) and execute the following command:
bcdedit /set hypervisorlaunchtype Auto
Uninstall Hyper-V.
Restart your computer.
Install Hyper-V.
Restart your computer and verify that Hyper-V is working.
Install Windows Sandbox.
Restart your computer and verify that Sandbox is functioning properly.
The link: https://answers.microsoft.com/zh-hans/windows/forum/all/windows-10-%E6%89%93%E5%BC%80windows/286f8a35-6a74-433c-b00f-bcd03812d180 I'm not sure why this solution is effective, but it did resolve the issue with my WSL2 not functioning properly.
Additional information: The issue with my WSL2 occurred after I installed an Android emulator called Mumu.
I also have the same issue. When this problem occurred, both my Windows Sandbox and WSL2 stopped working properly. Then I found an article about fixing the Sandbox and resolved the issue by following these steps:
Uninstall Windows Sandbox.
Restart your computer.
Open Command Prompt (Run as administrator) and execute the following command:
bcdedit /set hypervisorlaunchtype Auto
Uninstall Hyper-V.
Restart your computer.
Install Hyper-V.
Restart your computer and verify that Hyper-V is working.
Install Windows Sandbox.
Restart your computer and verify that Sandbox is functioning properly.
The link: https://answers.microsoft.com/zh-hans/windows/forum/all/windows-10-%E6%89%93%E5%BC%80windows/286f8a35-6a74-433c-b00f-bcd03812d180 I'm not sure why this solution is effective, but it did resolve the issue with my WSL2 not functioning properly.
Thanks for your answer. I was really stuck on that error. Following first 6 steps helped me to install sucessfully Ubuntu and run docker server on my Winddoows 11 machine
I'm experiencing absolutely the same problem. Tried all solutions listed, nothing really helps.
@shokurov Please try to open window's terminal as administrator, enter bcdedit command and check if the value of hypervisorlaunchtype is Auto. then check if the Windows Subsystem for Linux software from Microsoft Store is the latest version. You can check as above, if all these are fine, I don't know anymore.
I also have the same issue. When this problem occurred, both my Windows Sandbox and WSL2 stopped working properly. Then I found an article about fixing the Sandbox and resolved the issue by following these steps:
Uninstall Windows Sandbox.
Restart your computer.
Open Command Prompt (Run as administrator) and execute the following command:
bcdedit /set hypervisorlaunchtype Auto
Uninstall Hyper-V.
Restart your computer.
Install Hyper-V.
Restart your computer and verify that Hyper-V is working.
Install Windows Sandbox.
Restart your computer and verify that Sandbox is functioning properly.
The link: https://answers.microsoft.com/zh-hans/windows/forum/all/windows-10-%E6%89%93%E5%BC%80windows/286f8a35-6a74-433c-b00f-bcd03812d180 I'm not sure why this solution is effective, but it did resolve the issue with my WSL2 not functioning properly.
You saved my day, i've spent 4 hours figuring this out, i did everything related to wsl, docker and BIOS stufff to enable virtualization, this was the answer.
Version
Microsoft Windows [Version 10.0.22621.1265]
WSL Version
Kernel Version
2
Distro Version
Ubuntu 22.04
Other Software
No response
Repro Steps
In Windows Features:
In task manager, virutalization is fully enabled in my BIOS, confirmed via systeminfo, too:
All of the online documentation takes me in loops or tells me to roll back to WSL 1.
The BIOS says I have virtualization enabled, the task manager says it....
I've disabled and re-enabled all of these checkboxes and rebooted, and I still cannot get WSL2 working on my Windows 11 box
Expected Behavior
I would expect ubuntu to load
Actual Behavior
Diagnostic Logs
No response