Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installer does not install WSL due to new output #7975

Closed
mook-as opened this issue Dec 18, 2024 · 6 comments
Closed

Installer does not install WSL due to new output #7975

mook-as opened this issue Dec 18, 2024 · 6 comments
Assignees
Labels
area/installer For the installer, updater and uninstaller. area/wsl WSL integration kind/bug Something isn't working platform/windows
Milestone

Comments

@mook-as
Copy link
Contributor

mook-as commented Dec 18, 2024

Actual Behavior

> wsl --version
The Windows Subsystem for Linux is not installed. You can install by running 'wsl.exe --install'.
For more information please visit https://aka.ms/wslinstall

Press any key to install Windows Subsystem for Linux.
Press CTRL-C or close this window to cancel.
This prompt will time out in 60 seconds.
Operation aborted

Steps to Reproduce

  1. Run an updated Windows 11 without WSL installed.
  2. Try to install Rancher Desktop

Result

WSL is not automatically installed.

Expected Behavior

WSL is installed as part of setup.

Additional Information

In the installer, we do go down the forced elevated path (so it detects that WSL was not installed).

Relevant logs from the installer:

time="2024-12-18T14:28:32-08:00" level=trace msg="Could not get version from wsl --version, trying inbox versions..." error="error running wsl --version: exit status 1"
time="2024-12-18T14:28:32-08:00" level=info msg="WSL install state: Version=0.0.0.0 kernel=0.0.0.0 (outdated-kernel)"

time="2024-12-18T14:31:50-08:00" level=info msg="Installing WSL..."
Action 14:31:50: InstallWSL. Installing Windows Subsystem for Linux...
time="2024-12-18T14:31:51-08:00" level=info msg="The Windows Subsystem for Linux is not installed. You can install by running 'wsl.exe --install'."
time="2024-12-18T14:31:51-08:00" level=info msg="For more information please visit https://aka.ms/wslinstall"
time="2024-12-18T14:31:51-08:00" level=error msg="Installing WSL failed" error="exit status 1"

Note that the install appears to have succeeded.

Rancher Desktop Version

1.17.0-gbc7bc49

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 11 Pro 24H2 (Build 26100.2605)

What CPU architecture are you using?

x64

Linux only: what package format did you use to install Rancher Desktop?

None

Windows User Only

No response

@mook-as mook-as added kind/bug Something isn't working platform/windows area/installer For the installer, updater and uninstaller. area/wsl WSL integration release-note labels Dec 18, 2024
@gunamata gunamata added this to the 1.17 milestone Dec 19, 2024
@gunamata
Copy link
Contributor

To be release noted for 1.17.
A fix would be targeted for a later release.

@jandubois jandubois modified the milestones: 1.17, 1.18 Dec 30, 2024
@jandubois
Copy link
Member

Moving to 1.18 because the information has been added to the draft release note for 1.17.

@mook-as mook-as self-assigned this Jan 7, 2025
@mook-as
Copy link
Contributor Author

mook-as commented Jan 8, 2025

Fun: I can't reproduce this with an up-to-date copy of Windows 11, but I do see it when I install from scratch.

@mook-as
Copy link
Contributor Author

mook-as commented Jan 9, 2025

Somehow the WSL stub seems busted in Win11 24H2; $null | wsl --install reports:

The Windows Subsystem for Linux is not installed. You can install by running 'wsl.exe --install'.
For more information please visit https://aka.ms/wslinstall

That is, it acts as if the arguments were not given. I think this means I'll need to construct a console that wsl.exe is happy with in order to run the install?


Nope, doing an AllocConsole does not help; we get:

AllocConsole() returned 1: The specified system semaphore name was not found.

Spawning cmd.exe /c in a new window doesn't work either. My next attempt might have to be using a scheduled task…

@mook-as mook-as modified the milestones: 1.18, 1.17.1 Jan 10, 2025
@mook-as
Copy link
Contributor Author

mook-as commented Jan 17, 2025

Some notes:

  • I got the scheduled task to work (bonus: I can debug things using cmd /k as the task…)
  • It looks like they went back to using *.msi (or maybe moved it to the initial run); we can no longer install WSL from within our installer (because the installer is already running and the database is locked). We may need to switch back to the thing where we ran the install after…

I think longer term we may need to split the Windows installation methods:

  • *.msi for managed (corporate) deployments and upgrades; this just includes what we already have, minus the things for installing WSL. For managed deployments the administrator is responsible for installing WSL first before running our installer.
  • *.exe that wraps WSL's *.msi + our *.msi: this just installs two things in sequence. This is to work around the issue with not being able to start an install from the installer.

This would essentially be doing the bundle stuff that WiX does. I'm not sure yet if we should be using that directly, or doing something completely custom.

@mook-as
Copy link
Contributor Author

mook-as commented Jan 20, 2025

For the short term, we've opted to not install WSL as part of our installer. We may end up using a bundle in the future (i.e. an exe loader), but that would not be in this issue.

@mook-as mook-as closed this as completed Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/installer For the installer, updater and uninstaller. area/wsl WSL integration kind/bug Something isn't working platform/windows
Projects
None yet
Development

No branches or pull requests

3 participants