'Error: wsl.exe exited with code 4294967295 on Installing Rancher Desktop

I am getting the below error when installing the latest stable Rancher Desktop in my Virtual Machine.

Could someone please help?

Error:

Error: wsl.exe exited with code 4294967295

Command:

wsl --distribution rancher-desktop --exec mkdir -p /mnt/wsl/rancher-desktop/run/data

Logs:

2022-02-02T09:58:39.490Z: Running command wsl --distribution rancher-desktop --exec wslpath -a -u C:\Users\VIVEK~1.NUN\AppData\Local\Temp\rd-distro-gGd3SG\distro.tar... 2022-02-02T09:58:40.641Z: Running command wsl --distribution rancher-desktop --exec tar -cf /mnt/c/Users/VIVEK~1.NUN/AppData/Local/Temp/rd-distro-gGd3SG/distro.tar -C / /bin/busybox /bin/mount /bin/sh /lib /etc/wsl.conf /etc/passwd /etc/rancher /var/lib... 2022-02-02T09:58:42.628Z: Running command wsl --import rancher-desktop-data C:\Users\Vivek.Nuna\AppData\Local\rancher-desktop\distro-data C:\Users\VIVEK~1.NUN\AppData\Local\Temp\rd-distro-gGd3SG\distro.tar --version 2... 2022-02-02T09:58:44.025Z: Running command wsl --distribution rancher-desktop-data --exec /bin/busybox [ ! -d /etc/rancher ]... 2022-02-02T09:58:44.025Z: Running command wsl --distribution rancher-desktop-data --exec /bin/busybox [ ! -d /var/lib ]... 2022-02-02T10:03:54.533Z: Running command wsl --terminate rancher-desktop... 2022-02-02T10:03:54.534Z: Running command wsl --terminate rancher-desktop-data... 2022-02-02T10:03:54.971Z: Running command wsl --distribution rancher-desktop --exec mkdir -p /mnt/wsl/rancher-desktop/run/data... 2022-02-02T10:04:03.418Z: WSL: executing: mkdir -p /mnt/wsl/rancher-desktop/run/data: Error: wsl.exe exited with code 4294967295

enter image description here



Solution 1:[1]

I resolved the issue by following steps 4 and 5 here: https://docs.microsoft.com/en-us/windows/wsl/install-manual#step-4---download-the-linux-kernel-update-package

I found this answer by looking in %USERPROFILE%\AppData\Local\rancher-desktop\logs\wsl-exec.log which revealed: "WSL 2 requires an update to its kernel component. For information please visit https://aka.ms/wsl2kernel"

Solution 2:[2]

  1. Right click Rancher Desktop Icon in Task bar, And Select "Quit Rancher Desktop"
  2. Done below in cmd.exe or powershell
> wsl --unregister rancher-desktop
> wsl --unregister rancher-desktop-data

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Kourosh M
Solution 2