3

When trying to set the default version to 2 (I'm using windows 11) I got the error 0xffffffff as follows:

PS C:\WINDOWS\system32> wsl --set-version Ubuntu 2

For information on key differences with WSL 2 please visit https://aka.ms/wsl2 Conversion in progress, this may take a few minutes.

Error: 0xffffffff

I've tried many solutions given On GitHub and some other places so far, but it didn't make any difference and got the error: 0xffffffff again. I've used This Tutorial on Youtube to install WSL2 and again got the same error!

And also when turning on my pc, after seconds, I will run into an error saying:

An unexpected error occurred

Failed to deploy distro docker-desktop to C:\Users\HP\AppData\Local\Docker\wsl\distro: : Error: 0xffffffff

Some WSL system related access rights are not set correctly. This sometimes happens after waking the computer or not being connected to your domain/active directory. Please try to reboot the computer. If not sufficient, WSL may need to be reinstalled fully. As a last resort, try to uninstall/reinstall Docker Desktop.

The error above is because of the Docker app, and all these issues I'm struggling with are due to that I wanted to use and run Docker on my windows!

Can anyone help?

1
  • Thanks for reposting over here. That's some good additional info on the Docker message -- That might be the key. Not sure just yet myself, but hopefully it will generate some ideas. Commented May 10, 2022 at 2:18

1 Answer 1

1

There's an open Github issue on the error 0xffffffff, but it's quite old (and supposedly was based on a Windows 10 Insider issue).

According to a comment by Craig Loewen of the Microsoft WSL team:

The error 0xffffffff indicates that the virtual network could not be created.

A few things to try:

  • First, from my own experience, there are issues creating the WSL network if either of the following directories is encrypted or compressed:

    • %userprofile%\AppData\Local\Packages\<packagename>
    • %userprofile%\temp

    The <packagename> will vary based on the distribution you installed in WSL. Since you have Ubuntu (a Linux distribution, or "distro"), the package directory should start with something like CanonicalGroupLimited and also have Ubuntu somewhere in it.

    Make sure that encryption and compression are turned off for those directories -- In File Explorer, right click the directory, select Properties. On the first (General) tab, select the Advanced button and deselect the Encrypt and Compress options, if they are selected.

  • From another comment in the Github issue (and confirmed by someone else), adding vmcompute.exe (the WSL virtual machine platform) to the exclusions list in Defender solved it (include Exploit protection). See this blog post for details.

  • Do you have Hyper-V installed on this system? It's not technically required for WSL2, but it does share a lot of functionality with WSL2. According to other comments in that thread, removing Hyper-V or the Hyper-V network adapters and reinstalling allowed it to work.

It's worth reading through that thread (and anything else you find regarding 0xffffffff and WSL2) to see if any of the above or any other comments work for you.

6
  • I couldn't find out this part: "Make sure that encryption and compression are turned off for those directories in the "Properties" in File Explorer.". Could you please explain it some more?
    – Hossein
    Commented May 10, 2022 at 3:34
  • @Hossein - Have you encrypted any files with EFS or used file compression? What’s confusing about that statement?
    – Ramhound
    Commented May 10, 2022 at 5:17
  • @Hossein You keep tagging Ramhound, perhaps missing the point that he's not the author of the answer - I am. I edited the post earlier to make it clear how to check for compression -- Please see the new instructions for how to check that. Also, Hyper-V pertains to both Windows 10 and 11, but you may not be using it. That's why I asked if you had it installed. If not, that won't be applicable to you. I'll also edit to try to make it more clear what the <distro> should be, but it varies from system to system. Commented May 11, 2022 at 1:38
  • @Hossein - Your follow up questions indicate you have a some research to do, my responses, have been perfectly clear. Please stop pinging me. All the links provided apply to Windows 10 and Windows 11
    – Ramhound
    Commented May 11, 2022 at 9:07
  • @NotTheDr01ds Thanks, I've found the distro you explained, but now what to do? For example: Now I have a folder named AppData, Should I check the checkbox saying: Compress contents to save disc space (after right-clicking on AppData, selecting properties, then selecting Advanced)??
    – Hossein
    Commented May 11, 2022 at 17:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .