1

I'm trying to install Ubuntu on my Windows 11 machine and I get this error:

WslRegisterDistribution failed with error: 0xffffffff
Error: 0xffffffff (null)

System Info:

Edition Windows 11 Home Single Language 
Version 22H2 
Installed on ‎2022-‎09-‎12 
OS build 22623.1037 
Experience Windows Feature Experience Pack 1000.22638.1000.

Output of wsl --version:

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.22623.1037

error image

7
  • Have you tried this StackOverflow solution?
    – matigo
    Jan 2, 2023 at 7:50
  • @matigo yes I checked it, my port 53 is free already Jan 2, 2023 at 8:49
  • Keep in mind the warning that you should have received when you added the image to your post -- We do ask that you also include the relevant text for many reasons! Thanks! Jan 2, 2023 at 16:49
  • What does wsl --version show? Jan 2, 2023 at 16:51
  • @NotTheDr01ds this is what I get: 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.22623.1037 Jan 3, 2023 at 8:08

2 Answers 2

1

From the Stack Overflow question on the same error message that was reference in the comments, there were several suggestions. I'm going to add them (and some additional) here in case they help you (and others).

  • First, for others sake, this error has commonly been caused in the past when another service is running on port 53 on the Windows host. In the comments, you mention that you have already checked this on your system. However, if the following suggestions still don't work for you, this is the area that I would suggest you focus on.

  • Networking issues (which, in theory, could cause the port 53 conflict) have been seen when the user's profile is encrypted and/or compressed. As noted in the SO answer, try using File Explorer to navigate to %localappdata%\Packages\. Look for a Canonical... folder in there. The name will vary depending on which Ubuntu release you are trying to install, but you can probably be safe in changing all of these:

    Right-click on each of the Canonical... folders, click the Advanced button on the General tab and make sure that neither the Compress nor Encrypt options are selected.

  • If all else fails, the main "workaround" that has been successful for many people is to install Ubuntu under WSL1, then convert it to WSL2.

    1. Since you are on Windows 11, WSL1 may not longer be installed (it is still, currently, on Windows 10). Check it and turn it on if needed in the Turn Windows features on or off settings.

    2. From PowerShell (as a regular user, not as Administrator, despite what the Stack Overflow answer says):

      wsl --set-default-version 1
      
    3. Check if any Ubuntu is registered:

      wsl -l -v
      

      There shouldn't be, based on the above error.

    4. Run ubuntu.exe (if using "plain, unversioned" Ubuntu from the Store), ubuntu2004.exe, ubuntu2204.exe, etc.

      The registration will take slightly longer this way, but will hopefully succeed. At the completion, you'll be asked for an Ubuntu username and password.

    5. If this completes, then you can try changing the distribution to WSL2. First, exit Ubuntu. From PowerShell (again, as a regular user):

      wsl -l -v
      # Confirm the name of the distribution is "Ubuntu" and modify the next command if needed
      wsl --shutdown
      wsl --set-version ubuntu 2
      wsl ~ -d ubuntu
      
6
  • Thanks for the response. Since point 1 and 2 is all fine on my machine. I tried the 3rd method which is to install Ubuntu under WSL1, then convert it to WSL2. When I try to set the wsl version back to 2, I get this error: There is no distribution with the supplied name. Error code: Wsl/Service/WSL_E_DISTRO_NOT_FOUND Jan 9, 2023 at 3:59
  • @AhnafAhamed Hmm. Does that WSL 1 distribution show with wsl -l -v? Jan 9, 2023 at 10:35
  • Yes, it does show Jan 9, 2023 at 12:22
  • @AhnafAhamed Odd -- Are you able to run it as a WSL1 distribution? And you've double-checked the wsl --set-version <distro_name> 2 is using the correct name? Jan 9, 2023 at 16:38
  • Yes, I am able to run it on WSL 1, seems like I used the the wrong distro name, hence the above error. Now I tried it with the correct distro name, I'm running into this error Error: 0xffffffff Error code: Wsl/Service/CreateVm/ConfigureNetworking/0xffffffff Jan 9, 2023 at 17:11
0

If you are using a VM on Mac (using fusion 13) make sure you "enable hypervisor applications in this virtual machine" enter image description here

You must log in to answer this question.

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