Skip to content

[WSL2] experimental/wsl2 template has systemd misconfigured and integration test is fainling #3267

New issue

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

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

Already on GitHub? # to your account

Closed
arixmkii opened this issue Feb 22, 2025 · 1 comment · Fixed by #3351

Comments

@arixmkii
Copy link
Contributor

Description

For out of the box configured machine systemd has startup issues. This results in failing integration test.

With WSL2 with NAT networking mode list of failed units:

[systemd]
Failed Units: 2
  audit-rules.service
  auditd.service

With WSL2 with mirrored networking mode list of failed units:

[systemd]
Failed Units: 3
  audit-rules.service
  auditd.service
  NetworkManager-wait-online.service

Example output from shell:

limactl shell wsl2 systemctl is-system-running --wait
time="2025-02-22T16:35:59+02:00" level=warning msg="treating lima version \"4e0539cb.m\" from \"C:\\\\Users\\\\Arthu\\\\.lima\\\\wsl2\\\\lima-version\" as very latest release"
degraded

echo %ERRORLEVEL%
-1

Potentially this is an issue for the upstream provider of the base system, but it is unclear if there is a more suitable place to report this. Failing integration test still has place.

@arixmkii
Copy link
Contributor Author

arixmkii commented Mar 9, 2025

There sources stating that WSL2 kernel doesn't include auditing support in their default build https://randombytes.substack.com/p/problematic-systemd-units-under-wsl

So, auditd services have to be either disabled or uninstalled in the upstream root fs.

There is also occasional failure of getty-console, but this is attributed to some bug in systemd util-linux/util-linux#2896 (comment) Current WSL2 template is Fedora 40 image, Fedora 41 or soon to be released Fedora 42 might resolve this entirely.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants