rancher-desktop
rancher-desktop copied to clipboard
Rancher Desktop does not detect WSL installed from Microsoft Store on install
Actual Behavior
The title to this issue may be wrong but it appears that Rancher Desktop on install to Windows 11 does not detect an existing WSL kernel installed by the Windows Subsystem for Linux app from the Microsoft Store (so-called "lifted" WSL installs). Rancher Desktop attempts to install a new WSL kernel but fails displaying a Windows Installer modal dialog without error:
If a user then runs Rancher Desktop they are confronted with a WSL error code:
Steps to Reproduce
- Install Windows Subsystem for Linux from the Microsoft Store
- Install Ubuntu from the Microsoft Store
- Launch Ubuntu and create password
- Install Rancher Desktop
- Attempt to launch Rancher Desktop
Result
Errors are reproduced above.
Expected Behavior
Rancher Desktop should smoothly install and create a Kubernetes cluster.
Additional Information
No response
Rancher Desktop Version
1.5.0
Rancher Desktop K8s Version
N/A
Which container engine are you using?
containerd (nerdctl)
What operating system are you using?
Windows
Operating System / Build Version
Windows 10.0.22622 Build 22622
What CPU architecture are you using?
x64
Linux only: what package format did you use to install Rancher Desktop?
No response
Windows User Only
ESET Internet Security 15.2.11.0
@worldofgeese thanks for letting us know about this situation. In our docs, we do make mention of the fact that you don't need to pre-install WSL to run Rancher Desktop:
Rancher Desktop requires Windows Subsystem for Linux on Windows; this will automatically be installed as part of the Rancher Desktop setup. Manually downloading a distribution is not necessary. (from https://docs.rancherdesktop.io/getting-started/installation)
Is there a use case for you to install WSL first before Rancher Desktop? Are there features in that version that are required? What happens if you uninstall that and install Rancher Desktop and let it install WSL with it or does your security policy not allow that?
@gaktive I went ahead and completely uninstalled WSL, rebooted, then reinstalled Rancher Desktop only to encounter the same error and this strange WSL modal that appears, which looks to me like the wrong arguments are being provided and this modal is offering a list of correct arguments.
We see the same error appear as indicated in my first comment. I also tried a Factory Reset and installing both 1.5.0 and 1.5.1 to the same effect.
Here is a link to a GIF of me testing 1.5.0 from install time.
I could not repro this. I tried below steps on a Windows 10 (Work machine), and a Windows 11 (Personal)..
- I first uninstalled existing Rancher Desktop, then uninstalled WSL using the steps given on this page - https://windowsreport.com/uninstall-wsl-windows-11/
- Installed the latest version (1.5.1) of Rancher Desktop. During the installation process I noticed messages in the console where "Virtual Machine Platform" and "Windows Subsystem for Linux" are enabled.
- At the end of the installation, it prompted me to restart the machine. After restarting, I launched Rancher Desktop and the app started with out issues.
- I went further ahead and installed Ubuntu distro,
wsl --install -d Ubuntu-20.04
, and it all worked fine.
@worldofgeese , Can you please try these steps with the latest version (1.5.1) and see if it works.. If it doesn't, Can you please also try wsl --update
as suggested here.
@gunamata I believe my issue name is a misnomer and is unrelated to the type of WSL install. I tried to reinstall Rancher Desktop 1.5.1and never received the following modal which precedes a nonfunctional install:
This is the first time I've had a successful reinstall. I believe the error code 4294967295 is the more instructive error, which looks related to Winsock. There are 25 issues containing this error code in this repository almost all of them still open: is the error code worth investigating?
However, I'm now encountering a new error where container rebuilds fail:
[2022-08-30T13:34:37.889Z] Sending build context to Docker daemon 5.438MB
[2022-08-30T13:34:37.893Z] Step 1/10 : ARG BASE_IMAGE
Step 2/10 : FROM $BASE_IMAGE
[2022-08-30T13:34:37.893Z] ---> 73fe87e380e0
Step 3/10 : USER root
[2022-08-30T13:34:37.955Z] ---> Running in f9d1073b4e63
[2022-08-30T13:34:38.006Z] Removing intermediate container f9d1073b4e63
---> 11381db9fe4a
Step 4/10 : ARG REMOTE_USER
[2022-08-30T13:34:38.027Z] ---> Running in 39d4d9ca960e
[2022-08-30T13:34:38.080Z] Removing intermediate container 39d4d9ca960e
---> 459b688cc40f
[2022-08-30T13:34:38.080Z] Step 5/10 : ARG NEW_UID
[2022-08-30T13:34:38.106Z] ---> Running in 6f035f2a3350
[2022-08-30T13:34:38.164Z] Removing intermediate container 6f035f2a3350
---> 5b4d56e7f22e
Step 6/10 : ARG NEW_GID
[2022-08-30T13:34:38.189Z] ---> Running in 946d9ef67bed
[2022-08-30T13:34:38.251Z] Removing intermediate container 946d9ef67bed
---> 3b643a1cdd1a
Step 7/10 : SHELL ["/bin/sh", "-c"]
[2022-08-30T13:34:38.277Z] ---> Running in bb1ed65eefca
[2022-08-30T13:34:38.343Z] Removing intermediate container bb1ed65eefca
---> 8c3f22743a17
Step 8/10 : RUN eval $(sed -n "s/${REMOTE_USER}:[^:]*:\([^:]*\):\([^:]*\):[^:]*:\([^:]*\).*/OLD_UID=\1;OLD_GID=\2;HOME_FOLDER=\3/p" /etc/passwd); eval $(sed -n "s/\([^:]*\):[^:]*:${NEW_UID}:.*/EXISTING_USER=\1/p" /etc/passwd); eval $(sed -n "s/\([^:]*\):[^:]*:${NEW_GID}:.*/EXISTING_GROUP=\1/p" /etc/group); if [ -z "$OLD_UID" ]; then echo "Remote user not found in /etc/passwd ($REMOTE_USER)."; elif [ "$OLD_UID" = "$NEW_UID" -a "$OLD_GID" = "$NEW_GID" ]; then echo "UIDs and GIDs are the same ($NEW_UID:$NEW_GID)."; elif [ "$OLD_UID" != "$NEW_UID" -a -n "$EXISTING_USER" ]; then echo "User with UID exists ($EXISTING_USER=$NEW_UID)."; elif [ "$OLD_GID" != "$NEW_GID" -a -n "$EXISTING_GROUP" ]; then echo "Group with GID exists ($EXISTING_GROUP=$NEW_GID)."; else echo "Updating UID:GID from $OLD_UID:$OLD_GID to $NEW_UID:$NEW_GID."; sed -i -e "s/\(${REMOTE_USER}:[^:]*:\)[^:]*:[^:]*/\1${NEW_UID}:${NEW_GID}/" /etc/passwd; if [ "$OLD_GID" != "$NEW_GID" ]; then sed -i -e "s/\([^:]*:[^:]*:\)${OLD_GID}:/\1${NEW_GID}:/" /etc/group; fi; chown -R $NEW_UID:$NEW_GID $HOME_FOLDER; fi;
[2022-08-30T13:34:38.343Z]
[2022-08-30T13:34:38.370Z] ---> Running in 5f50b16ca886
[2022-08-30T13:34:38.687Z] UIDs and GIDs are the same (1000:1000).
[2022-08-30T13:34:39.021Z] Removing intermediate container 5f50b16ca886
---> 2da2d99416c9
Step 9/10 : ARG IMAGE_USER
[2022-08-30T13:34:39.043Z] ---> Running in 29fc6951ff09
[2022-08-30T13:34:39.104Z] Removing intermediate container 29fc6951ff09
---> c8eb3f609a1c
Step 10/10 : USER $IMAGE_USER
[2022-08-30T13:34:39.128Z] ---> Running in ed133c65187b
[2022-08-30T13:34:39.185Z] Removing intermediate container ed133c65187b
---> 2829568627c7
[2022-08-30T13:34:39.194Z] Successfully built 2829568627c7
[2022-08-30T13:34:39.201Z] Successfully tagged vsc-vscode-remote-try-python-2cd59e4ce29331d120510fdbda5408dd-uid:latest
[2022-08-30T13:34:39.207Z] Stop (2254 ms): Run: docker build -f /tmp/vsch-taohansen/updateUID.Dockerfile-0.245.2 -t vsc-vscode-remote-try-python-2cd59e4ce29331d120510fdbda5408dd-uid --build-arg BASE_IMAGE=vsc-vscode-remote-try-python-2cd59e4ce29331d120510fdbda5408dd --build-arg REMOTE_USER=vscode --build-arg NEW_UID=1000 --build-arg NEW_GID=1000 --build-arg IMAGE_USER=root /tmp/vsch-taohansen
[2022-08-30T13:34:39.208Z] Start: Run: docker -v
[2022-08-30T13:34:40.056Z] Stop (848 ms): Run: docker -v
[2022-08-30T13:34:40.056Z] Start: Run: docker events --format {{json .}} --filter event=start
[2022-08-30T13:34:40.097Z] Start: Starting container
[2022-08-30T13:34:40.097Z] Start: Run: docker run --sig-proxy=false -a STDOUT -a STDERR --mount type=bind,source=/home/taohansen/vscode-remote-try-python,target=/workspaces/vscode-remote-try-python --mount type=bind,src=/var/run/docker.sock,dst=/var/run/docker-host.sock --mount type=volume,src=minikube-config,dst=/home/vscode/.minikube --mount type=volume,src=vscode,dst=/vscode -l devcontainer.local_folder=\\wsl.localhost\fedoraremix\home\taohansen\vscode-remote-try-python --entrypoint /bin/sh vsc-vscode-remote-try-python-2cd59e4ce29331d120510fdbda5408dd-uid -c echo Container started
[2022-08-30T13:34:40.830Z] docker: Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/mnt/wsl/rancher-desktop/run/docker-mounts/9e9bf7e9-dd71-406a-8bae-144e6724f410" to rootfs at "/var/run/docker-host.sock": mount /mnt/wsl/rancher-desktop/run/docker-mounts/9e9bf7e9-dd71-406a-8bae-144e6724f410:/var/run/docker-host.sock (via /proc/self/fd/6), flags: 0x5000: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type.
[2022-08-30T13:34:40.832Z] Stop (735 ms): Run: docker run --sig-proxy=false -a STDOUT -a STDERR --mount type=bind,source=/home/taohansen/vscode-remote-try-python,target=/workspaces/vscode-remote-try-python --mount type=bind,src=/var/run/docker.sock,dst=/var/run/docker-host.sock --mount type=volume,src=minikube-config,dst=/home/vscode/.minikube --mount type=volume,src=vscode,dst=/vscode -l devcontainer.local_folder=\\wsl.localhost\fedoraremix\home\taohansen\vscode-remote-try-python --entrypoint /bin/sh vsc-vscode-remote-try-python-2cd59e4ce29331d120510fdbda5408dd-uid -c echo Container started
[2022-08-30T13:34:40.832Z] Start: Run: docker ps -q -a --filter label=devcontainer.local_folder=\\wsl.localhost\fedoraremix\home\taohansen\vscode-remote-try-python
[2022-08-30T13:34:40.881Z] Stop (825 ms): Run: docker events --format {{json .}} --filter event=start
[2022-08-30T13:34:41.706Z] Stop (874 ms): Run: docker ps -q -a --filter label=devcontainer.local_folder=\\wsl.localhost\fedoraremix\home\taohansen\vscode-remote-try-python
[2022-08-30T13:34:41.706Z] Start: Run: docker inspect --type container 8972e0ea3036
[2022-08-30T13:34:42.556Z] Stop (850 ms): Run: docker inspect --type container 8972e0ea3036
[2022-08-30T13:34:42.558Z] Error: Command failed: docker run --sig-proxy=false -a STDOUT -a STDERR --mount type=bind,source=/home/taohansen/vscode-remote-try-python,target=/workspaces/vscode-remote-try-python --mount type=bind,src=/var/run/docker.sock,dst=/var/run/docker-host.sock --mount type=volume,src=minikube-config,dst=/home/vscode/.minikube --mount type=volume,src=vscode,dst=/vscode -l devcontainer.local_folder=\\wsl.localhost\fedoraremix\home\taohansen\vscode-remote-try-python --entrypoint /bin/sh vsc-vscode-remote-try-python-2cd59e4ce29331d120510fdbda5408dd-uid -c echo Container started
[2022-08-30T13:34:42.558Z] trap "exit 0" 15
[2022-08-30T13:34:42.558Z] /usr/local/share/docker-init.sh
[2022-08-30T13:34:42.558Z] exec "$@"
[2022-08-30T13:34:42.558Z] while sleep 1 & wait $!; do :; done -
[2022-08-30T13:34:42.558Z] at MS (/home/taohansen/.vscode-remote-containers/dist/dev-containers-cli-0.245.2/dist/spec-node/devContainersSpecCLI.js:255:2186)
[2022-08-30T13:34:42.559Z] at Zw (/home/taohansen/.vscode-remote-containers/dist/dev-containers-cli-0.245.2/dist/spec-node/devContainersSpecCLI.js:255:2124)
[2022-08-30T13:34:42.559Z] at processTicksAndRejections (node:internal/process/task_queues:96:5)
[2022-08-30T13:34:42.559Z] at async KS (/home/taohansen/.vscode-remote-containers/dist/dev-containers-cli-0.245.2/dist/spec-node/devContainersSpecCLI.js:261:2006)
[2022-08-30T13:34:42.559Z] at async co (/home/taohansen/.vscode-remote-containers/dist/dev-containers-cli-0.245.2/dist/spec-node/devContainersSpecCLI.js:261:3110)
[2022-08-30T13:34:42.559Z] at async LP (/home/taohansen/.vscode-remote-containers/dist/dev-containers-cli-0.245.2/dist/spec-node/devContainersSpecCLI.js:360:9352)
[2022-08-30T13:34:42.559Z] at async DP (/home/taohansen/.vscode-remote-containers/dist/dev-containers-cli-0.245.2/dist/spec-node/devContainersSpecCLI.js:360:9108)
[2022-08-30T13:34:42.561Z] Stop (118930 ms): Run in Host: /home/taohansen/.vscode-server/bin/e4503b30fc78200f846c62cf8091b76ff5547662/node /home/taohansen/.vscode-remote-containers/dist/dev-containers-cli-0.245.2/dist/spec-node/devContainersSpecCLI.js up --workspace-folder /home/taohansen/vscode-remote-try-python --workspace-mount-consistency cached --id-label devcontainer.local_folder=\\wsl.localhost\fedoraremix\home\taohansen\vscode-remote-try-python --log-level debug --log-format json --config /home/taohansen/vscode-remote-try-python/.devcontainer/devcontainer.json --default-user-env-probe loginInteractiveShell --build-no-cache --remove-existing-container --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root true
[2022-08-30T13:34:42.562Z] Exit code 1
[2022-08-30T13:34:42.564Z] Command failed: /home/taohansen/.vscode-server/bin/e4503b30fc78200f846c62cf8091b76ff5547662/node /home/taohansen/.vscode-remote-containers/dist/dev-containers-cli-0.245.2/dist/spec-node/devContainersSpecCLI.js up --workspace-folder /home/taohansen/vscode-remote-try-python --workspace-mount-consistency cached --id-label devcontainer.local_folder=\\wsl.localhost\fedoraremix\home\taohansen\vscode-remote-try-python --log-level debug --log-format json --config /home/taohansen/vscode-remote-try-python/.devcontainer/devcontainer.json --default-user-env-probe loginInteractiveShell --build-no-cache --remove-existing-container --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root true
[2022-08-30T13:34:42.565Z] Exit code 1
[2022-08-30T13:34:56.301Z] Start: Run: wsl -d fedoraremix -e wslpath -u \\wsl.localhost\fedoraremix\home\taohansen\vscode-remote-try-python
[2022-08-30T13:34:56.487Z] Stop (186 ms): Run: wsl -d fedoraremix -e wslpath -u \\wsl.localhost\fedoraremix\home\taohansen\vscode-remote-try-python
I need to restart my entire computer when this occurs then RD will rebuild a container image once before erroring again on any subsequent rebuilds.
Should it be relevant this is a rebuild of any dev container, which is a supported workflow according to RD docs. You can test using my dev container sample.
Could it be related to MicrosoftDocs/WSL#547?
I have not encountered the errors above, but I just updated from v1.5.1 to v1.6.0 and noticed the installer installed the WSL Windows' feature and required a reboot as I only had the store version installed. I'd prefer if it didn't install it as I already had WSL from Store.
Uninstalling the WSL feature, the store version works fine and it is not re-installed when launching Rancher Desktop.
I have the same preference, partly because at one point having the WSL feature enabled prevented me from launching the latest version of SQL Server Management Studio, which I unfortunately didn't figure out was caused by that particular detail until after I'd gotten so frustrated I reset my Windows installation and had to deal with that entire hassle. The fact that it tries to enable it again every time Rancher Desktop updates kind of adds to the frustration.
Just ran into that same issue installing v1.6.1 on a freshly formatted Windows 10 work machine, Rancher Desktop would throw me the same error
I noticed that when I ran wsl --list
that there was zero distros installed. What solved the issue was
- Running
wsl --shutdown
; - Uninstalling Rancher Desktop;
- Reboot windows;
- Install Rancher Desktop;
After that Rancher Desktop installed successfully.
Just ran into that same issue installing v1.6.1 on a freshly formatted Windows 10 work machine, Rancher Desktop would throw me the same error
I noticed that when I ran
wsl --list
that there was zero distros installed. What solved the issue was
- Running
wsl --shutdown
;- Uninstalling Rancher Desktop;
- Reboot windows;
- Install Rancher Desktop;
After that Rancher Desktop installed successfully.
This fixed my issue :)
@pxds and @mutyasaisrikar I was having a similar issue. I did the same steps which you have mentioned. But it did not work for me. For some reason everytime I installed Rancher Desktop (version 1.9.1), the rancher distors were being assigned the same IP. The kubernetes services were not able to connect to that IP and 6443 port. Then finally I shutdown WSL, uninstalled Rancher Desktop and uninstalled WSL itself. I restarted my laptop and installed Rancher Desktop. It asked to restart my laptop after the install. And Voilà, everything started working after that. I installed my favoitire WSL distro after that and it is also working.
Hope this helps anyone having issues similar to me.