Rootless podman user cannot run containers with cgroups V2 enabled

Solution Verified - Updated -

Issue

  • Rootless podman user cannot run containers:

    $ podman run -d registry.access.redhat.com/ubi8 sleep 300
    Error: OCI runtime error: the requested cgroup controller `pids` is not available
    

    fails with:

    Error: runc: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: process_linux.go:508: setting cgroup config for procHooks process caused: open /sys/fs/cgroup/user.slice/user-1000.slice/user@1000.service/user.slice/libpod-ccec5cc68f0733aac58b0ed48752974f78db70e917fe9e6275ba2f264aac775a.scope/pids.max: no such file or directory: OCI runtime attempted to invoke a command that was not found
    
  • Rootless podman user cannot run containers with cpu resource-control:

    $ podman run -d registry.access.redhat.com/ubi8 --cpus 1.0 sleep 300
    Error: runc: time="2024-03-11T17:17:25+09:00" level=error msg="runc create failed: unable to start container process: error during container init: error setting cgroup config for procHooks process: open /sys/fs/cgroup/user.slice/user-1000.slice/user@1000.service/user.slice/libpod-9c0a6d3a6305ad8a35f3130d7cb55cd49c287362696664b554542881c682e751.scope/cpu.max: no such file or directory": OCI runtime attempted to invoke a command that was not found
    

Environment

  • Red Hat Enterprise Linux 8
  • podman

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content