Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
While WSL2 now uses a vm it does not support systemd well out of the box which results in failed events when using journalctl.
Steps to reproduce the issue:
Describe the results you received:
kingwill101@LAPTOP-EIDKDC7T:~$ podman --log-level debug run -it docker.io/library/alpine sh DEBU[0000] using conmon: "/usr/libexec/podman/conmon"
DEBU[0000] Initializing boltdb state at /home/kingwill101/.local/share/containers/storage/libpod/bolt_state.db DEBU[0000] Using graph driver overlay
DEBU[0000] Using graph root /home/kingwill101/.local/share/containers/storage DEBU[0000] Using run root /tmp/run-1000 DEBU[0000] Using static dir /home/kingwill101/.local/share/containers/storage/libpod DEBU[0000] Using tmp dir /tmp/run-1000/libpod/tmp DEBU[0000] Using volume path /home/kingwill101/.local/share/containers/storage/volumes DEBU[0000] Set libpod namespace to "" DEBU[0000] Not configuring container store DEBU[0000] Initializing event backend journald DEBU[0000] using runtime "/usr/bin/runc" WARN[0000] Error initializing configured OCI runtime crun: no valid executable found for OCI runtime crun: invalid argument
DEBU[0000] using conmon: "/usr/libexec/podman/conmon"
DEBU[0000] Initializing boltdb state at /home/kingwill101/.local/share/containers/storage/libpod/bolt_state.db DEBU[0000] Using graph driver overlay DEBU[0000] Using graph root /home/kingwill101/.local/share/containers/storage DEBU[0000] Using run root /tmp/run-1000 DEBU[0000] Using static dir /home/kingwill101/.local/share/containers/storage/libpod DEBU[0000] Using tmp dir /tmp/run-1000/libpod/tmp DEBU[0000] Using volume path /home/kingwill101/.local/share/containers/storage/volumes DEBU[0000] Set libpod namespace to "" DEBU[0000] [graphdriver] trying provided driver "overlay" DEBU[0000] overlay: mount_program=/usr/bin/fuse-overlayfs DEBU[0000] backingFs=extfs, projectQuotaSupported=false, useNativeDiff=false, usingMetacopy=false DEBU[0000] Initializing event backend journald DEBU[0000] using runtime "/usr/bin/runc" WARN[0000] Error initializing configured OCI runtime crun: no valid executable found for OCI runtime crun: invalid argument
INFO[0000] running as rootless
DEBU[0000] using conmon: "/usr/libexec/podman/conmon" DEBU[0000] Initializing boltdb state at /home/kingwill101/.local/share/containers/storage/libpod/bolt_state.db DEBU[0000] Using graph driver overlay DEBU[0000] Using graph root /home/kingwill101/.local/share/containers/storage DEBU[0000] Using run root /tmp/run-1000 DEBU[0000] Using static dir /home/kingwill101/.local/share/containers/storage/libpod DEBU[0000] Using tmp dir /tmp/run-1000/libpod/tmp DEBU[0000] Using volume path /home/kingwill101/.local/share/containers/storage/volumes DEBU[0000] Set libpod namespace to "" DEBU[0000] Initializing event backend journald DEBU[0000] using runtime "/usr/bin/runc" WARN[0000] Error initializing configured OCI runtime crun: no valid executable found for OCI runtime crun: invalid argument
DEBU[0000] parsed reference into "[overlay@/home/kingwill101/.local/share/containers/storage+/tmp/run-1000:overlay.mount_program=/usr/bin/fuse-overlayfs]docker.io/library/alpine:latest"
DEBU[0000] parsed reference into "[overlay@/home/kingwill101/.local/share/containers/storage+/tmp/run-1000:overlay.mount_program=/usr/bin/fuse-overlayfs]@961769676411f082461f9ef46626dd7a2d1e2b2a38e6a44364bcbecf51e66dd4"
DEBU[0000] exporting opaque data as blob "sha256:961769676411f082461f9ef46626dd7a2d1e2b2a38e6a44364bcbecf51e66dd4" DEBU[0000] parsed reference into "[overlay@/home/kingwill101/.local/share/containers/storage+/tmp/run-1000:overlay.mount_program=/usr/bin/fuse-overlayfs]@961769676411f082461f9ef46626dd7a2d1e2b2a38e6a44364bcbecf51e66dd4"
DEBU[0000] exporting opaque data as blob "sha256:961769676411f082461f9ef46626dd7a2d1e2b2a38e6a44364bcbecf51e66dd4" DEBU[0000] parsed reference into "[overlay@/home/kingwill101/.local/share/containers/storage+/tmp/run-1000:overlay.mount_program=/usr/bin/fuse-overlayfs]@961769676411f082461f9ef46626dd7a2d1e2b2a38e6a44364bcbecf51e66dd4"
DEBU[0000] No hostname set; container's hostname will default to runtime default DEBU[0000] Using slirp4netns netmode DEBU[0000] created OCI spec and options for new container DEBU[0000] Allocated lock 10 for container cbac7c57f973d87858925e353ce8bb4d90f19988c4cbc5ea1d3ed66fea37f8ed DEBU[0000] parsed reference into "[overlay@/home/kingwill101/.local/share/containers/storage+/tmp/run-1000:overlay.mount_program=/usr/bin/fuse-overlayfs]@961769676411f082461f9ef46626dd7a2d1e2b2a38e6a44364bcbecf51e66dd4"
DEBU[0000] exporting opaque data as blob "sha256:961769676411f082461f9ef46626dd7a2d1e2b2a38e6a44364bcbecf51e66dd4" DEBU[0000] created container "cbac7c57f973d87858925e353ce8bb4d90f19988c4cbc5ea1d3ed66fea37f8ed"
DEBU[0000] container "cbac7c57f973d87858925e353ce8bb4d90f19988c4cbc5ea1d3ed66fea37f8ed" has work directory "/home/kingwill101/.local/share/containers/storage/overlay-containers/cbac7c57f973d87858925e353ce8bb4d90f19988c4cbc5ea1d3ed66fea37f8ed/userdata"
DEBU[0000] container "cbac7c57f973d87858925e353ce8bb4d90f19988c4cbc5ea1d3ed66fea37f8ed" has run directory "/tmp/run-1000/overlay-containers/cbac7c57f973d87858925e353ce8bb4d90f19988c4cbc5ea1d3ed66fea37f8ed/userdata"
ERRO[0000] unable to write pod event: "write unixgram @000bd->/run/systemd/journal/socket: sendmsg: no such file or directory"
DEBU[0000] New container created "cbac7c57f973d87858925e353ce8bb4d90f19988c4cbc5ea1d3ed66fea37f8ed" DEBU[0000] container "cbac7c57f973d87858925e353ce8bb4d90f19988c4cbc5ea1d3ed66fea37f8ed" has CgroupParent "/libpod_parent/libpod-cbac7c57f973d87858925e353ce8bb4d90f19988c4cbc5ea1d3ed66fea37f8ed"
DEBU[0000] Handling terminal attach DEBU[0000] overlay: mount_data=lowerdir=/home/kingwill101/.local/share/containers/storage/overlay/l/SZRWTCSHLQAVDATUFUHTYYSX4M,upperdir=/home/kingwill101/.local/share/containers/storage/overlay/31bc34efb7e14b9116f68e12178c577f3a8cc2cdad6343354054d4c67614ac50/diff,workdir=/home/kingwill101/.local/share/containers/storage/overlay/31bc34efb7e14b9116f68e12178c577f3a8cc2cdad6343354054d4c67614ac50/work
DEBU[0000] Made network namespace at /tmp/run-1000/netns/cni-a8e33159-1c0c-1fda-a4ce-5fda618f09f4 for container cbac7c57f973d87858925e353ce8bb4d90f19988c4cbc5ea1d3ed66fea37f8ed
DEBU[0000] slirp4netns command: /usr/bin/slirp4netns --disable-host-loopback --mtu 65520 --enable-sandbox -c -e 3 -r 4 --netns-type=path /tmp/run-1000/netns/cni-a8e33159-1c0c-1fda-a4ce-5fda618f09f4 tap0
DEBU[0000] mounted container "cbac7c57f973d87858925e353ce8bb4d90f19988c4cbc5ea1d3ed66fea37f8ed" at "/home/kingwill101/.local/share/containers/storage/overlay/31bc34efb7e14b9116f68e12178c577f3a8cc2cdad6343354054d4c67614ac50/merged"
DEBU[0001] Created root filesystem for container cbac7c57f973d87858925e353ce8bb4d90f19988c4cbc5ea1d3ed66fea37f8ed at /home/kingwill101/.local/share/containers/storage/overlay/31bc34efb7e14b9116f68e12178c577f3a8cc2cdad6343354054d4c67614ac50/merged
DEBU[0001] unmounted container "cbac7c57f973d87858925e353ce8bb4d90f19988c4cbc5ea1d3ed66fea37f8ed"
DEBU[0001] Tearing down network namespace at /tmp/run-1000/netns/cni-a8e33159-1c0c-1fda-a4ce-5fda618f09f4 for container cbac7c57f973d87858925e353ce8bb4d90f19988c4cbc5ea1d3ed66fea37f8ed
DEBU[0001] Cleaning up container cbac7c57f973d87858925e353ce8bb4d90f19988c4cbc5ea1d3ed66fea37f8ed
DEBU[0001] Network is already cleaned up, skipping... DEBU[0001] Container cbac7c57f973d87858925e353ce8bb4d90f19988c4cbc5ea1d3ed66fea37f8ed storage is already unmounted, skipping... DEBU[0001] ExitCode msg: "slirp4netns failed" ERRO[0001] slirp4netns failed
Describe the results you expected:
Additional information you deem important (e.g. issue happens only occasionally):
Output of podman version:
podman version Version: 1.6.1
RemoteAPI Version: 1
Go Version: go1.10.4
OS/Arch: linux/amd64
Output of podman info --debug:
podman info --debug
debug:
compiler: gc
git commit: ""
go version: go1.10.4
podman version: 1.6.1
host:
BuildahVersion: 1.11.2
CgroupVersion: v1
Conmon:
package: 'conmon: /usr/libexec/podman/conmon'
path: /usr/libexec/podman/conmon
version: 'conmon version 2.0.1, commit: unknown'
Distribution:
distribution: ubuntu
version: "19.04"
MemFree: 14469201920
MemTotal: 17768742912
OCIRuntime:
package: 'containerd.io: /usr/bin/runc'
path: /usr/bin/runc
version: |-
runc version 1.0.0-rc8+dev
commit: 3e425f80a8c931f88e6d94a8c831b9d5aa481657
spec: 1.0.1-dev
SwapFree: 5368709120
SwapTotal: 5368709120
arch: amd64
cpus: 8
eventlogger: journald
hostname: LAPTOP-EIDKDC7T
kernel: 4.19.72-microsoft-standard
os: linux
rootless: true
slirp4netns:
Executable: /usr/bin/slirp4netns
Package: 'slirp4netns: /usr/bin/slirp4netns'
Version: |-
slirp4netns version 0.4.1
commit: unknown
uptime: 39m 12.21s
registries:
blocked: null
insecure: null
search:
- docker.io
- registry.fedoraproject.org
- quay.io
- registry.access.redhat.com
- registry.centos.org
store:
ConfigFile: /home/kingwill101/.config/containers/storage.conf
ContainerStore:
number: 23
GraphDriverName: overlay
GraphOptions:
overlay.mount_program:
Executable: /usr/bin/fuse-overlayfs
Package: 'fuse-overlayfs: /usr/bin/fuse-overlayfs'
Version: |-
fusermount3 version: 3.4.1
fuse-overlayfs: version 0.3
FUSE library version 3.4.1
using FUSE kernel interface version 7.27
GraphRoot: /home/kingwill101/.local/share/containers/storage
GraphStatus:
Backing Filesystem: extfs
Native Overlay Diff: "false"
Supports d_type: "true"
Using metacopy: "false"
ImageStore:
number: 24
RunRoot: /tmp/run-1000
VolumePath: /home/kingwill101/.local/share/containers/storage/volumes
Package info (e.g. output of rpm -q podman or apt list podman):
podman/disco,now 1.6.1-1~ubuntu19.04~ppa3 amd64 [installed]
change the event logger in your libpod.conf to file.
@glenfordwilliams did this help?
This issue had no activity for 30 days. In the absence of activity or the "do-not-close" label, the issue will be automatically closed within 7 days.
Can we build a podman specific for WSL2?
sure but i dont think it is worth it. to use wsl2, you "install" a linux distro and then use apt or whatever to install podman. it would mean the distro would have to build and distribute it
This issue had no activity for 30 days. In the absence of activity or the "do-not-close" label, the issue will be automatically closed within 7 days.
A friendly reminder that this issue had no activity for 30 days.
I have published a blog on this -> https://www.redhat.com/sysadmin/podman-windows-wsl2 I now consider this closed.
I have published a blog on this -> https://www.redhat.com/sysadmin/podman-windows-wsl2 I now consider this closed.
Sir, can I achieve this in centos or arch from yuk7 https://github.com/yuk7/ArchWSL
I've been trying but no success, do you recommend other centos distribution?.
I have published a blog on this -> https://www.redhat.com/sysadmin/podman-windows-wsl2 I now consider this closed.
@baude is there another way to achieve this? the latest podman version doesn't create libpod.conf anymore https://github.com/containers/podman/issues/7509
I have published a blog on this -> https://www.redhat.com/sysadmin/podman-windows-wsl2 I now consider this closed.
@baude is there another way to achieve this? the latest podman version doesn't create
libpod.confanymore #7509
I thought libpod.conf was renamed to containers.conf. Does Podman work for you in WSL2 nonetheless?
Yes containers.conf is the way to go.
Yes containers.conf is the way to go.
Hi @rhatdan Thanks for the information provided. I was following your guide until the "Rootless configuration file changes". Podman wasn't working and I was getting crazy looking for the libpod.conf until I found thir thread. Would be awesome if you could update the post :)
Keep the awesome work, thanks
@sdyalor
I made an automation covering the blog article to install Podman on WSL using ansible-pull. Supported distros are Debian, Ubuntu and Arch Linux. Arch is untested but it should work.
Most helpful comment
I have published a blog on this -> https://www.redhat.com/sysadmin/podman-windows-wsl2 I now consider this closed.