Skip to content

WSL systemd support - #29837

Draft
l0rd wants to merge 2 commits into
podman-container-tools:mainfrom
l0rd:wsl-systemd-support
Draft

l0rd wants to merge 2 commits into
podman-container-tools:mainfrom
l0rd:wsl-systemd-support

Conversation

@l0rd

@l0rd l0rd commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

Fixes:

Opening this as a draft to check CI, I still want to work on it to try supporting WSL versions prior to 0.67.6.

Checklist

Ensure you have completed the following checklist for your pull request to be reviewed:

  • I have read and understood our contributing guidelines and will not have more than two open PRs as a new contributor.
  • PR description, commit message, and GitHub comments are human-written, per LLM Policy
  • Certify you wrote the patch or otherwise have the right to pass it on as an open-source patch by signing all
    commits. (git commit -s). (If needed, use git commit -s --amend). The author email must match
    the sign-off email address. See CONTRIBUTING.md
    for more information.
  • Referenced issues using Fixes: #00000 in commit message (if applicable)
  • Tests have been added/updated (or no tests are needed)
  • Documentation has been updated (or no documentation changes are needed)
  • All commits pass make validatepr (format/lint checks)
  • Release note entered in the section below (or None if no user-facing changes)

Does this PR introduce a user-facing change?

None

@l0rd
l0rd force-pushed the wsl-systemd-support branch from b20e013 to 24bd31b Compare September 25, 2026 08:49
@l0rd l0rd added the No New Tests Allow PR to proceed without adding regression tests label Sep 25, 2026
Comment on lines +41 to +42
const wslConf = `[boot]
systemd=true

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM for rootless support

Comment on lines 512 to 514
if err != nil {
return false, err
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This check seems to contradict what the comment suggests.

if err := wslInvoke(dist, "sh", "-c", fmt.Sprintf(changePort, port)); err != nil {
return fmt.Errorf("could not change SSH port for guest OS: %w", err)
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The failed tests suggest a race between this and the systemd sshd service. systemctl try-restart sshd.service may be needed here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chemwolf6922 thank you for looking at it. I will resume working on this in a couple of days.

l0rd added 2 commits October 24, 2026 18:58
Podman machines v6.x don't start on versions of WSL earlier than v2.5.1
because of their old Kernels with cgroupv1 support.

Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
Fixes podman-container-tools#15967

New machines bootstraps script doesn't start systemd anymore.

For old existing machines, where the script /usr/local/bin/enterns
exists, systemd is still stared in a namespace.

Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
@l0rd
l0rd force-pushed the wsl-systemd-support branch from 21fc832 to 649bd06 Compare October 24, 2026 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

machine No New Tests Allow PR to proceed without adding regression tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants