WslRegisterDistribution failed with error: 0xffffffff

30.6k Views Asked by At

Unable to install Ubuntu 20.04 LTS in WSL 2. I have enabled all the required things for WSl. It is resulting following error. Error message

5

There are 5 best solutions below

15
On BEST ANSWER

Please try the following:

  1. Go to System Tools => Resource Monitor GUI for windows
  2. Check which service is using port 53,
  3. Once you identify it, kill the process as follows: taskkill /f /pid [PID].
  4. Go to Users/[youruser]/AppData/Local/Packages/ and look for a folder called CanonicalGroupLimitedUbuntu... then right click on it, go to Properties => Advanced Options and disable compression for the folder, then click accept and also apply this change for subfolders.

[Note] Windows uses Compression for the installation folders so is not possible to run it.

Once this is done, try to run your installation and should be working.

Hope it helps. Regards

3
On

Open PowerShell as Administrator and run this command to set WSL back to version 1.

PS C:\> wsl --set-default-version 1

If you have run the kernel update as of today before installing Ubuntu or Kali you will encounter this issue. This is the only way I have found to work around the issue. You can switch it back to WSL 2 after installing OS.

0
On

First: The following hardware prerequisites are required to successfully run WSL 2 on Windows 10 or Windows 11:

  1. 64-bit processor with Second Level Address Translation (SLAT)
  2. 4GB system RAM
  3. BIOS-level hardware virtualization support must be enabled in the BIOS settings. For more information,see Virtualization
  4. Download and install the Linux kernel update package.link

Second: Install WSL command with Windows PowerShell(Admin):

wsl --install

This command will enable the required optional components, download the latest Linux kernel, set WSL 2 as your default, and install a Linux distribution for you (Ubuntu by default, see below to change this). The first time you launch a newly installed Linux distribution, a console window will open and you'll be asked to wait for files to de-compress and be stored on your machine. All future launches should take less than a second. ** Note** The above command only works if WSL is not installed at all, if you run wsl --install and see the WSL help text, please try running wsl --list --online to see a list of available distros and run wsl --install -d <DistroName> to install a distro.

If you still get the error:

  1. Open PowerShell as Administrator and run wsl --install -d Ubuntu to set WSL back to version 1
0
On

For me, the issue was a service was using port 53 and this was in turn stopping WSL/Docker from launching. It's just a shame that this issue isn't reflected in the error message at all. One more thing for people in the same situation to try.

0
On

The error is occuring up to today. So I faced it as well. After checking out the advices from the other answers I've just come up with simply wsl --update to upgrade the WSL2 version and after rebooting the failure was gone.