From e7a45fbc97b216618fb4a94da3b8ef565adac5d5 Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Tue, 23 Jun 2026 13:05:15 +0200 Subject: [PATCH] machine/wsl: drop cgroup_manager cgroupfs I think this should work fine with the defaults. Since we mount the /etc/containers dir always we should no longer write to /etc/containers. If we still need this it should be moved into the image and not done at init time. Signed-off-by: Paul Holzinger (cherry picked from commit 81fd1e6e85e398f1fe39ca1a7585f035a0518a95) Signed-off-by: Paul Holzinger --- pkg/machine/wsl/declares.go | 6 ------ pkg/machine/wsl/machine.go | 4 ---- 2 files changed, 10 deletions(-) diff --git a/pkg/machine/wsl/declares.go b/pkg/machine/wsl/declares.go index 4cf5c2a626..7cbbcfbade 100644 --- a/pkg/machine/wsl/declares.go +++ b/pkg/machine/wsl/declares.go @@ -8,12 +8,6 @@ const ( currentMachineVersion = 3 ) -const containersConf = `[containers] - -[engine] -cgroup_manager = "cgroupfs" -` - const appendPort = `grep -q Port\ %d /etc/ssh/sshd_config || echo Port %d >> /etc/ssh/sshd_config` const changePort = `sed -E -i 's/^Port[[:space:]]+[0-9]+/Port %d/' /etc/ssh/sshd_config` diff --git a/pkg/machine/wsl/machine.go b/pkg/machine/wsl/machine.go index b6a23c4c96..264bbe9e15 100644 --- a/pkg/machine/wsl/machine.go +++ b/pkg/machine/wsl/machine.go @@ -167,10 +167,6 @@ func configureSystem(mc *vmconfigs.MachineConfig, dist string, ansibleConfig *vm return err } - if err := wslPipe(containersConf, dist, "sh", "-c", "cat > /etc/containers/containers.conf"); err != nil { - return fmt.Errorf("could not create containers.conf for guest OS: %w", err) - } - if err := setupPodmanDockerSock(dist, mc.HostUser.Rootful); err != nil { return err }