podman: Error starting toolbox container on WSL2: openat2 `dev/shm`: No such file or directory
/kind bug
Description
Trying to start a container created by toolbox doesn’t work. Steps to reproduce the issue:
-
run
export XDG_RUNTIME_DIR=/run/user/1000to make the creation of the image happen (https://github.com/containers/toolbox/issues/1036) -
run
toolbox create -v -c 18.04 --image docker.io/library/ubuntu:18.04to create the image -
run
toolbox enter 18.04-> ErrorError: failed to start container 18.04occurs -
try to run the container without toolbox to get more information:
podman start 18.04
Describe the results you received: Error message appears:
Error: unable to start container "a9f7c064b46311fd87630bb25f85eed5861c9c93815713722de724c65b09440a": openat2 `dev/shm`: No such file or directory: OCI runtime attempted to invoke a command that was not found
Describe the results you expected: The container is up and running
Additional information you deem important (e.g. issue happens only occasionally):
Output of podman version:
podman version 3.4.2
Output of podman info --debug:
host:
arch: amd64
buildahVersion: 1.23.1
cgroupControllers: []
cgroupManager: cgroupfs
cgroupVersion: v1
conmon:
package: 'conmon: /usr/libexec/podman/conmon'
path: /usr/libexec/podman/conmon
version: 'conmon version 2.1.0, commit: '
cpus: 8
distribution:
codename: focal
distribution: ubuntu
version: "20.04"
eventLogger: file
hostname: HI000205
idMappings:
gidmap:
- container_id: 0
host_id: 1000
size: 1
- container_id: 1
host_id: 100000
size: 65536
- container_id: 65537
host_id: 200000
size: 1001
uidmap:
- container_id: 0
host_id: 1000
size: 1
- container_id: 1
host_id: 100000
size: 65536
- container_id: 65537
host_id: 200000
size: 1001
kernel: 5.10.16.3-microsoft-standard-WSL2
linkmode: dynamic
logDriver: k8s-file
memFree: 10996322304
memTotal: 13283876864
ociRuntime:
name: crun
package: 'crun: /usr/bin/crun'
path: /usr/bin/crun
version: |-
crun version UNKNOWN
commit: ea1fe3938eefa14eb707f1d22adff4db670645d6
spec: 1.0.0
+SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +YAJL
os: linux
remoteSocket:
path: /run/user/1000/podman/podman.sock
security:
apparmorEnabled: false
capabilities: CAP_CHOWN,CAP_DAC_OVERRIDE,CAP_FOWNER,CAP_FSETID,CAP_KILL,CAP_NET_BIND_SERVICE,CAP_SETFCAP,CAP_SETGID,CAP_SETPCAP,CAP_SETUID,CAP_SYS_CHROOT
rootless: true
seccompEnabled: true
seccompProfilePath: /usr/share/containers/seccomp.json
selinuxEnabled: false
serviceIsRemote: false
slirp4netns:
executable: /usr/bin/slirp4netns
package: 'slirp4netns: /usr/bin/slirp4netns'
version: |-
slirp4netns version 1.1.8
commit: unknown
libslirp: 4.3.1-git
SLIRP_CONFIG_VERSION_MAX: 3
libseccomp: 2.4.3
swapFree: 4294967296
swapTotal: 4294967296
uptime: 49m 7.83s
plugins:
log:
- k8s-file
- none
- journald
network:
- bridge
- macvlan
volume:
- local
registries:
search:
- docker.io
- quay.io
store:
configFile: /home/flo/.config/containers/storage.conf
containerStore:
number: 6
paused: 0
running: 0
stopped: 6
graphDriverName: overlay
graphOptions:
overlay.mount_program:
Executable: /usr/bin/fuse-overlayfs
Package: 'fuse-overlayfs: /usr/bin/fuse-overlayfs'
Version: |-
fusermount3 version: 3.9.0
fuse-overlayfs: version 1.5
FUSE library version 3.9.0
using FUSE kernel interface version 7.31
graphRoot: /home/flo/.local/share/containers/storage
graphStatus:
Backing Filesystem: extfs
Native Overlay Diff: "false"
Supports d_type: "true"
Using metacopy: "false"
imageStore:
number: 6
runRoot: /tmp/podman-run-1000/containers
volumePath: /home/flo/.local/share/containers/storage/volumes
version:
APIVersion: 3.4.2
Built: 0
BuiltTime: Thu Jan 1 01:00:00 1970
GitCommit: ""
GoVersion: go1.16.6
OsArch: linux/amd64
Version: 3.4.2
Package info (e.g. output of rpm -q podman or apt list podman):
podman/now 100:3.4.2-1 amd64 [installed,local]
Manage pods, containers and container images.
podman-machine-cni/now 100:0.0.0-1 amd64 [installed,local]
Plugins for podman
podman-plugins/now 100:1.2.0-1 amd64 [installed,local]
Plugins for podman
Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/main/troubleshooting.md)
Yes
Additional environment details (AWS, VirtualBox, physical, etc.):
I’m running WLS2 on a Windows 10 host and changed the following settings in the file /etc/containers/containers.conf:
events_logger = "file"
cgroup_manager = "cgroupfs"
Also here is the outpu of podman inspect 18.04:
podman inspect 18.04
[
{
"Id": "7c8a3ceec391faebcf5b0a71a535086cfb634a3fa1be193f9253d5176ddb6c63",
"Created": "2022-04-08T21:48:35.2415389+02:00",
"Path": "toolbox",
"Args": [
"--log-level",
"debug",
"init-container",
"--gid",
"1000",
"--home",
"/home/flo",
"--shell",
"/bin/bash",
"--uid",
"1000",
"--user",
"flo",
"--monitor-host",
"--rm",
"-it",
"18.04",
"/bin/bash"
],
"State": {
"OciVersion": "1.0.2-dev",
"Status": "configured",
"Running": false,
"Paused": false,
"Restarting": false,
"OOMKilled": false,
"Dead": false,
"Pid": 0,
"ExitCode": 0,
"Error": "",
"StartedAt": "0001-01-01T00:00:00Z",
"FinishedAt": "0001-01-01T00:00:00Z",
"Healthcheck": {
"Status": "",
"FailingStreak": 0,
"Log": null
}
},
"Image": "f5cbed4244ba3f663e03aaa70f5a4cd0f1c03ad186c3560b639488e84d9f027d",
"ImageName": "docker.io/library/ubuntu:18.04",
"Rootfs": "",
"Pod": "",
"ResolvConfPath": "",
"HostnamePath": "/tmp/podman-run-1000/containers/overlay-containers/7c8a3ceec391faebcf5b0a71a535086cfb634a3fa1be193f9253d5176ddb6c63/userdata/hostname",
"HostsPath": "",
"StaticDir": "/home/flo/.local/share/containers/storage/overlay-containers/7c8a3ceec391faebcf5b0a71a535086cfb634a3fa1be193f9253d5176ddb6c63/userdata",
"OCIConfigPath": "/home/flo/.local/share/containers/storage/overlay-containers/7c8a3ceec391faebcf5b0a71a535086cfb634a3fa1be193f9253d5176ddb6c63/userdata/config.json",
"OCIRuntime": "crun",
"ConmonPidFile": "/tmp/podman-run-1000/containers/overlay-containers/7c8a3ceec391faebcf5b0a71a535086cfb634a3fa1be193f9253d5176ddb6c63/userdata/conmon.pid",
"PidFile": "/tmp/podman-run-1000/containers/overlay-containers/7c8a3ceec391faebcf5b0a71a535086cfb634a3fa1be193f9253d5176ddb6c63/userdata/pidfile",
"Name": "18.04",
"RestartCount": 0,
"Driver": "overlay",
"MountLabel": "",
"ProcessLabel": "",
"AppArmorProfile": "",
"EffectiveCaps": [
"CAP_AUDIT_CONTROL",
"CAP_AUDIT_READ",
"CAP_AUDIT_WRITE",
"CAP_BLOCK_SUSPEND",
"CAP_BPF",
"CAP_CHECKPOINT_RESTORE",
"CAP_CHOWN",
"CAP_DAC_OVERRIDE",
"CAP_DAC_READ_SEARCH",
"CAP_FOWNER",
"CAP_FSETID",
"CAP_IPC_LOCK",
"CAP_IPC_OWNER",
"CAP_KILL",
"CAP_LEASE",
"CAP_LINUX_IMMUTABLE",
"CAP_MAC_ADMIN",
"CAP_MAC_OVERRIDE",
"CAP_MKNOD",
"CAP_NET_ADMIN",
"CAP_NET_BIND_SERVICE",
"CAP_NET_BROADCAST",
"CAP_NET_RAW",
"CAP_PERFMON",
"CAP_SETFCAP",
"CAP_SETGID",
"CAP_SETPCAP",
"CAP_SETUID",
"CAP_SYSLOG",
"CAP_SYS_ADMIN",
"CAP_SYS_BOOT",
"CAP_SYS_CHROOT",
"CAP_SYS_MODULE",
"CAP_SYS_NICE",
"CAP_SYS_PACCT",
"CAP_SYS_PTRACE",
"CAP_SYS_RAWIO",
"CAP_SYS_RESOURCE",
"CAP_SYS_TIME",
"CAP_SYS_TTY_CONFIG",
"CAP_WAKE_ALARM"
],
"BoundingCaps": [
"CAP_AUDIT_CONTROL",
"CAP_AUDIT_READ",
"CAP_AUDIT_WRITE",
"CAP_BLOCK_SUSPEND",
"CAP_BPF",
"CAP_CHECKPOINT_RESTORE",
"CAP_CHOWN",
"CAP_DAC_OVERRIDE",
"CAP_DAC_READ_SEARCH",
"CAP_FOWNER",
"CAP_FSETID",
"CAP_IPC_LOCK",
"CAP_IPC_OWNER",
"CAP_KILL",
"CAP_LEASE",
"CAP_LINUX_IMMUTABLE",
"CAP_MAC_ADMIN",
"CAP_MAC_OVERRIDE",
"CAP_MKNOD",
"CAP_NET_ADMIN",
"CAP_NET_BIND_SERVICE",
"CAP_NET_BROADCAST",
"CAP_NET_RAW",
"CAP_PERFMON",
"CAP_SETFCAP",
"CAP_SETGID",
"CAP_SETPCAP",
"CAP_SETUID",
"CAP_SYSLOG",
"CAP_SYS_ADMIN",
"CAP_SYS_BOOT",
"CAP_SYS_CHROOT",
"CAP_SYS_MODULE",
"CAP_SYS_NICE",
"CAP_SYS_PACCT",
"CAP_SYS_PTRACE",
"CAP_SYS_RAWIO",
"CAP_SYS_RESOURCE",
"CAP_SYS_TIME",
"CAP_SYS_TTY_CONFIG",
"CAP_WAKE_ALARM"
],
"ExecIDs": [],
"GraphDriver": {
"Name": "overlay",
"Data": {
"LowerDir": "/home/flo/.local/share/containers/storage/overlay/95c443da13bfd8b24ba29f6379d0e72c72946d3356a2a437e635fbe2fc872cd8/diff",
"UpperDir": "/home/flo/.local/share/containers/storage/overlay/0f84561b79fa4fa5f9478b48345894c224d9a8eb73f85d4d1447308f738d8be9/diff",
"WorkDir": "/home/flo/.local/share/containers/storage/overlay/0f84561b79fa4fa5f9478b48345894c224d9a8eb73f85d4d1447308f738d8be9/work"
}
},
"Mounts": [
{
"Type": "bind",
"Source": "/mnt",
"Destination": "/mnt",
"Driver": "",
"Mode": "",
"Options": [
"rbind"
],
"RW": true,
"Propagation": "rslave"
},
{
"Type": "bind",
"Source": "/run/dbus/system_bus_socket",
"Destination": "/run/dbus/system_bus_socket",
"Driver": "",
"Mode": "",
"Options": [
"noexec",
"nosuid",
"rbind"
],
"RW": true,
"Propagation": "rprivate"
},
{
"Type": "bind",
"Source": "/usr/local/bin/toolbox",
"Destination": "/usr/bin/toolbox",
"Driver": "",
"Mode": "",
"Options": [
"rbind"
],
"RW": false,
"Propagation": "rprivate"
},
{
"Type": "bind",
"Source": "/media",
"Destination": "/media",
"Driver": "",
"Mode": "",
"Options": [
"rbind"
],
"RW": true,
"Propagation": "rslave"
},
{
"Type": "bind",
"Source": "/dev",
"Destination": "/dev",
"Driver": "",
"Mode": "",
"Options": [
"nosuid",
"rbind"
],
"RW": true,
"Propagation": "rslave"
},
{
"Type": "bind",
"Source": "/run/user/1000",
"Destination": "/run/user/1000",
"Driver": "",
"Mode": "",
"Options": [
"noexec",
"nosuid",
"nodev",
"rbind"
],
"RW": true,
"Propagation": "rprivate"
},
{
"Type": "bind",
"Source": "/run/media",
"Destination": "/run/media",
"Driver": "",
"Mode": "",
"Options": [
"noexec",
"nosuid",
"rbind"
],
"RW": true,
"Propagation": "rslave"
},
{
"Type": "bind",
"Source": "/etc/profile.d/toolbox.sh",
"Destination": "/etc/profile.d/toolbox.sh",
"Driver": "",
"Mode": "",
"Options": [
"rbind"
],
"RW": false,
"Propagation": "rprivate"
},
{
"Type": "bind",
"Source": "/",
"Destination": "/run/host",
"Driver": "",
"Mode": "",
"Options": [
"rbind"
],
"RW": true,
"Propagation": "rslave"
},
{
"Type": "bind",
"Source": "/home/flo",
"Destination": "/home/flo",
"Driver": "",
"Mode": "",
"Options": [
"rbind"
],
"RW": true,
"Propagation": "rslave"
}
],
"Dependencies": [],
"NetworkSettings": {
"EndpointID": "",
"Gateway": "",
"IPAddress": "",
"IPPrefixLen": 0,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"MacAddress": "",
"Bridge": "",
"SandboxID": "",
"HairpinMode": false,
"LinkLocalIPv6Address": "",
"LinkLocalIPv6PrefixLen": 0,
"Ports": {},
"SandboxKey": ""
},
"ExitCommand": [
"/usr/bin/podman",
"--root",
"/home/flo/.local/share/containers/storage",
"--runroot",
"/tmp/podman-run-1000/containers",
"--log-level",
"error",
"--cgroup-manager",
"cgroupfs",
"--tmpdir",
"/tmp/podman-run-1000/libpod/tmp",
"--runtime",
"crun",
"--storage-driver",
"overlay",
"--storage-opt",
"overlay.mount_program=/usr/bin/fuse-overlayfs",
"--events-backend",
"file",
"container",
"cleanup",
"7c8a3ceec391faebcf5b0a71a535086cfb634a3fa1be193f9253d5176ddb6c63"
],
"Namespace": "",
"IsInfra": false,
"Config": {
"Hostname": "toolbox",
"Domainname": "",
"User": "root:root",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"TERM=xterm",
"container=podman",
"TOOLBOX_PATH=/usr/local/bin/toolbox",
"XDG_RUNTIME_DIR=/run/user/1000",
"HOSTNAME=toolbox",
"HOME=/home/flo"
],
"Cmd": [
"toolbox",
"--log-level",
"debug",
"init-container",
"--gid",
"1000",
"--home",
"/home/flo",
"--shell",
"/bin/bash",
"--uid",
"1000",
"--user",
"flo",
"--monitor-host",
"--rm",
"-it",
"18.04",
"/bin/bash"
],
"Image": "docker.io/library/ubuntu:18.04",
"Volumes": null,
"WorkingDir": "/",
"Entrypoint": "",
"OnBuild": null,
"Labels": {
"com.github.containers.toolbox": "true"
},
"Annotations": {
"io.container.manager": "libpod",
"io.kubernetes.cri-o.Created": "2022-04-08T21:48:35.2415389+02:00",
"io.kubernetes.cri-o.TTY": "false",
"io.podman.annotations.autoremove": "FALSE",
"io.podman.annotations.init": "FALSE",
"io.podman.annotations.label": "disable",
"io.podman.annotations.privileged": "TRUE",
"io.podman.annotations.publish-all": "FALSE",
"org.opencontainers.image.stopSignal": "15"
},
"StopSignal": 15,
"CreateCommand": [
"podman",
"--log-level",
"error",
"create",
"--dns",
"none",
"--env",
"TOOLBOX_PATH=/usr/local/bin/toolbox",
"--env",
"XDG_RUNTIME_DIR=/run/user/1000",
"--hostname",
"toolbox",
"--ipc",
"host",
"--label",
"com.github.containers.toolbox=true",
"--name",
"18.04",
"--network",
"host",
"--no-hosts",
"--pid",
"host",
"--privileged",
"--security-opt",
"label=disable",
"--ulimit",
"host",
"--userns",
"keep-id",
"--user",
"root:root",
"--volume",
"/:/run/host:rslave",
"--volume",
"/dev:/dev:rslave",
"--volume",
"/run/dbus/system_bus_socket:/run/dbus/system_bus_socket",
"--volume",
"/home/flo:/home/flo:rslave",
"--volume",
"/usr/local/bin/toolbox:/usr/bin/toolbox:ro",
"--volume",
"/run/user/1000:/run/user/1000",
"--volume",
"/media:/media:rslave",
"--volume",
"/mnt:/mnt:rslave",
"--volume",
"/run/media:/run/media:rslave",
"--volume",
"/etc/profile.d/toolbox.sh:/etc/profile.d/toolbox.sh:ro",
"docker.io/library/ubuntu:18.04",
"toolbox",
"--log-level",
"debug",
"init-container",
"--gid",
"1000",
"--home",
"/home/flo",
"--shell",
"/bin/bash",
"--uid",
"1000",
"--user",
"flo",
"--monitor-host",
"--rm",
"-it",
"18.04",
"/bin/bash"
],
"Umask": "0022",
"Timeout": 0,
"StopTimeout": 10
},
"HostConfig": {
"Binds": [
"/mnt:/mnt:rslave,rw,rbind",
"/run/dbus/system_bus_socket:/run/dbus/system_bus_socket:rw,rprivate,noexec,nosuid,rbind",
"/usr/local/bin/toolbox:/usr/bin/toolbox:ro,rprivate,rbind",
"/media:/media:rslave,rw,rbind",
"/dev:/dev:rslave,rw,nosuid,rbind",
"/run/user/1000:/run/user/1000:rw,rprivate,noexec,nosuid,nodev,rbind",
"/run/media:/run/media:rslave,rw,noexec,nosuid,rbind",
"/etc/profile.d/toolbox.sh:/etc/profile.d/toolbox.sh:ro,rprivate,rbind",
"/:/run/host:rslave,rw,rbind",
"/home/flo:/home/flo:rslave,rw,rbind"
],
"CgroupManager": "cgroupfs",
"CgroupMode": "host",
"ContainerIDFile": "",
"LogConfig": {
"Type": "k8s-file",
"Config": null,
"Path": "/home/flo/.local/share/containers/storage/overlay-containers/7c8a3ceec391faebcf5b0a71a535086cfb634a3fa1be193f9253d5176ddb6c63/userdata/ctr.log",
"Tag": "",
"Size": "0B"
},
"NetworkMode": "host",
"PortBindings": {},
"RestartPolicy": {
"Name": "",
"MaximumRetryCount": 0
},
"AutoRemove": false,
"VolumeDriver": "",
"VolumesFrom": null,
"CapAdd": [],
"CapDrop": [],
"Dns": [],
"DnsOptions": [],
"DnsSearch": [],
"ExtraHosts": [],
"GroupAdd": [],
"IpcMode": "host",
"Cgroup": "",
"Cgroups": "default",
"Links": null,
"OomScoreAdj": 0,
"PidMode": "host",
"Privileged": true,
"PublishAllPorts": false,
"ReadonlyRootfs": false,
"SecurityOpt": [
"label=disable"
],
"Tmpfs": {},
"UTSMode": "private",
"UsernsMode": "private",
"ShmSize": 65536000,
"Runtime": "oci",
"ConsoleSize": [
0,
0
],
"Isolation": "",
"CpuShares": 0,
"Memory": 0,
"NanoCpus": 0,
"CgroupParent": "",
"BlkioWeight": 0,
"BlkioWeightDevice": null,
"BlkioDeviceReadBps": null,
"BlkioDeviceWriteBps": null,
"BlkioDeviceReadIOps": null,
"BlkioDeviceWriteIOps": null,
"CpuPeriod": 0,
"CpuQuota": 0,
"CpuRealtimePeriod": 0,
"CpuRealtimeRuntime": 0,
"CpusetCpus": "",
"CpusetMems": "",
"Devices": [],
"DiskQuota": 0,
"KernelMemory": 0,
"MemoryReservation": 0,
"MemorySwap": 0,
"MemorySwappiness": 0,
"OomKillDisable": false,
"PidsLimit": 0,
"Ulimits": [],
"CpuCount": 0,
"CpuPercent": 0,
"IOMaximumIOps": 0,
"IOMaximumBandwidth": 0,
"CgroupConf": null
}
}
]
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 26 (13 by maintainers)
Using these commands seems to at least work around the issue:
test -L /dev/shm && rm /dev/shm && mkdir /dev/shmmount --types tmpfs --options nosuid,nodev,noexec shm /dev/shmmount --types tmpfs --options nosuid,nodev,noexec shm /run/shmchmod 1777 /dev/shm /run/shm