-
Notifications
You must be signed in to change notification settings - Fork 830
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 --set-version <distro> 2 fails with "path not found" #5075
Comments
Has that other machine more RAM? If that distro doesn't have anything important is better to uninstall it and install it again directly as wsl2. wsl.exe --set-default-version 2 |
Thanks. Actually the machine where it works has less RAM than the non-working case. The working machine has 8 GB and the non-working has 16 GB. |
Conversion process has been improved in latest fast insider builds. That fix won't probably make it to slow ring because version 2004 release is imminent. |
Are you trying to install it on a drive other than C:? |
The distro is already installed and running fine under WSL 1. Everything is on the C drive. The upgrade from WSL 1 to 2 via the set-version command is what is failing with the "path not found" Error. |
Try disabling real time protection in Windows Defender before converting. Does it always last the same period of time until the error appears? |
@onomatopellan , yes, it errors out at the same time. |
Now it seems I am truly wedged. wsl -l -v shows no distros installed, but going into MS store shows my distro as installed. Launching the distro opens a windows that says installing and then fails with the error mentioned above. |
Reboot Windows and try this. |
Thanks onomatopellan, I will try the steps in the link you provided. For what it's worth, I removed the WSL feature, reinstalled it, but windows store thinks my distro of opensuse is isntalled while wsl -l -v does not show anything installed. I wonder where that information is kept. It is really bad design that one would install something via the Store but uninstall it via some other way, leaving store thinking the item is installed. |
I executed DISM /Online /Cleanup-Image /CheckHealth as stated in the link you provided. It said everything eas clean and no corruption was found. Windows Store still showed the distro as installed. I clicked the shortcut in the start menu for the distro. A window opens up where it says installing, and after a few minutes it fails again with error Error: 0x80070003. |
Try to unregister the damaged distro with If nothing works you can definitely erase it with regedit in |
wslconfig.exe /u distroName exits with "There is no distribution with the supplied name.". |
There are no distros installed then. |
That worked to uninstall the distro. I was able to right click on the tile and choose uninstall, which then made Windows Store realize it was not installed any longer. |
Then let's back to square one with |
That works, I can install the distro fine after setting the default version to 1. |
Ok then. Try again now with wsl.exe --export openSuse-Leap-15-1 ./openSuse.tar
mkdir ~/AppData/Local/openSuse
wsl.exe --import openSuse ~/AppData/Local/openSuse ./openSuse.tar --version 2 Tell me if you can at least create the .tar file without errors. |
Executing wsl --set-version openSuse-Leap-15-1 2 still failed with "path not found" as in the past. |
The exported tar file was created successfully. Trying to import it with --version 2 now. |
The import command fails with "path not found" ! |
I guess it doesn't work in any folder?
edit: I just tested it and it works for me. Do you see a vhdx file in ~/AppData/Local/openSuse or C:\test while import is running? |
I have the same problem,and I solved the problem by reinstall Microsoft-Windows-Subsystem-Linux,you can try it |
@onomatopellan I see a file called ext4b.vhdx show up in the target folder. The file gets deleted when the import process fails. |
I think what @LaiQE meant is to reinstall the Windows feature. You can try opening an elevated PowerShell and typing: Definitely something is impeding to fill the vhdx file.
then attach the 3 .etl files generated to a new post in this thread so @benhillis or @craigloewen-msft can look what's happening. |
I solved the problem follow this
|
I removed wsl by going into the windows features area of settings and removing wsl from there. Then I rebooted and installed it again. Ran into same problems trying to upgrade to version 2. |
The import was failing as described above but I noticed that the distro was still installed as version 1 when I was doing the import. I deleted the distro, and now the import fails much quicker and without even creating the vhdx file. I am attaching the logs from this particular run, namely exported distro, deleted distro in wsl (by right clicking the tile and choosing uninstall), and then attempting to import the exported .tar as a version 2. |
If you open C:\windows\System32\lxss\tools can you see the ext4.vhdx.gz file (412KB)? If something fails when creating the vhdx you could see it in Event Viewer. In Applications and Services Logs - Microsoft - Windows - VHDDMP. Look at the time stamps to know which entries match with the latest import call. |
I do see ext4.vhdx.gz in C:\windows\System32\lxss\tools. It is dated 12/07/2019 06:19. |
Interesting. Are you on Windows 10 Pro or Home? |
Windows 10 Pro. |
Please try this #4626 (comment) |
I tried what that link suggested, namely setting config guard setting for vmcompute.exe back to system default, but that did not make a difference. One difference between what the link seems to suggest and my setup is that on my machine, vmcompute service is running fine (or at least is running). I did do a net stop vmcompute and then net start vmcompute after making the one change it suggests in windows security. |
See if Hyper-V Virtual Machine Management service (vmms) is running. There are people that can't run Hyper-V because of that. Another example you can try: |
vmms is running. I added that additional exe to config guard exception as per the last link you provided. No joy so far. |
Solved! Removing the hyper-v feature and re-adding resolved the issue. Now I can start Hyper V VMs and also was able to import the distro with --version 2. Thank you to all for helping! |
I don't understand, why is hyper-V needed when we're trying to use WSL2? Doesn't WSL2 make hyper-v completely unnecessary? |
WSL V2 introduces the dependency on HyperV, WSL V1 did not require HyperV. More and more things from MS are requiring HyperV. So far I have come across Dockers for Windows and WSL V2. This makes it very difficult to use to VMs where embedded virtualization may not be allowed. |
Wow, I had no idea. It would be nice for the interface to convey in some way that the "deprecated" hyper-v system is required once more with WSL2. Anyway it seems like the "Hyper-V Host Compute Service" is the only hyper-v service that can't be disabled, I also have both "Windows Hypervisor Program" and "Hyper-V" unchecked in the add / remove windows features menu. |
I can't explain this but: wsl --set-version "Ubuntu" 2
There is no distribution with the supplied name. wsl --set-version Ubuntu 2
Conversion in progress, this may take a few minutes... |
Dependence on hyper-v makes no sense. One can not use nvidia in the container if you install the hyper-v components. At least thats what I have found. Can anyone confirm. Some solutons require to do things that I am afraid will loose access to guests. I cant afford to loose my guests. Can anyone confirm if any of the other solutions will cause loss of access to guests? Thanks in advance! |
windows 10 version 2004 build 19041.173.
WSL 1 is working fine.
wsl -l -v returns:
NAME STATE VERSION
When I execute wsl --set-version openSUSE-42 2, the command runs for a few minutes then fails with "The system cannot find the path specified."
The same steps executed on another machine with the same version and build of Windows 10 completed fine.
Is there any log or debug switch to see what the failing instance is failing on?
The text was updated successfully, but these errors were encountered: