Search code examples
dockercontainerscentos8podman

Unable to use --pod option with podman


I'm running podman on CentOS, and I get an error message when I use the --pod option.

[user@server ~]$ podman pod create -n hello
[user@server ~]$ podman run --pod hello hello-world
ERRO[0035] error starting some container dependencies
ERRO[0035] "container_linux.go:370: starting container process caused: process_linux.go:459: container init caused: rootfs_linux.go:59: mounting \"sysfs\" to rootfs at \"/sys\" caused: operation not permitted: OCI permission denied"
Error: error starting some containers: internal libpod error

If I don't use the --pod option, this will work fine.
Is this because I am using the wrong option?
Or is it a bug in podman?

This is the server information.

[user@server ~]$ cat /etc/redhat-release
CentOS Stream release 8
[user@server ~]$ podman -v
podman version 3.0.0-dev

[postscript]
I changed the version to 2.2.1 and the error changed.
However, it still does not work properly.

[user@server ~]$ podman run --pod hello hello-world
ERRO[0000] error starting some container dependencies
ERRO[0000] "selinux label is specified in config, but selinux is disabled or not supported: OCI runtime error"
Error: error starting some containers: internal libpod error
[user@server ~]$ podman -v
podman version 2.2.1

Solution

  • I found the reason for the error in version 3.0.0-dev.
    The reason was that I had not installed crun.
    This can be installed with the following command.

    [user@server ~]$ sudo dnf install crun