Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working on Ubuntu: "operation not permitted" #30

Open
afbjorklund opened this issue Jan 26, 2025 · 2 comments
Open

Not working on Ubuntu: "operation not permitted" #30

afbjorklund opened this issue Jan 26, 2025 · 2 comments

Comments

@afbjorklund
Copy link

afbjorklund commented Jan 26, 2025

I'm trying to make a template for Lima, from Ubuntu 24.10

But I am getting errors, even though nerdctl run works OK.

Not sure what the problem is, seems to be about namespaces:

lilipod --log-level=debug run --rm -ti alpine cat /etc/os-release

proc_utils.go:302 [debug] settings uidmap [{0 1 1000} {1000 0 1} {1001 1001 64536}]
proc_utils.go:303 [debug] settings gidmap [{0 1 1000} {1000 0 1} {1001 1001 64536}]
2025/01/26 17:25:00 fork/exec /bin/sh: operation not permitted
2025/01/26 17:25:00 exit status 1
proc_utils.go:79 [debug] error: exit status 1

The other templates are at https://lima-vm.io/docs/templates/

For this debugging I was running the latest version from main.

@afbjorklund
Copy link
Author

afbjorklund commented Jan 26, 2025

Added some extra debugging output, it is UntarFile that fails.

I think it is related to AppArmor, missing a /etc/apparmor.d

Workaround:

sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0

@afbjorklund
Copy link
Author

afbjorklund commented Jan 26, 2025

Gets a bit further, but fails in setupCgroupfs:

rootfs_utils.go:64 [debug] mounting new tmpfs fs on /sys/fs/cgroup
file_utils.go:330 [debug] ensuring destination point /sys/fs/cgroup exists
file_utils.go:334 [debug] mounting new tmpfs on /sys/fs/cgroup
rootfs_utils.go:74 [debug] mounting new cgroup fs on /sys/fs/cgroup
file_utils.go:284 [debug] ensuring destination point /sys/fs/cgroup exists
rootfs_utils.go:660 [debug] error: mkdir /sys/fs/cgroup/container-ymzqib_pooq5r.scope: permission denied

Needs systemd-run (slice), as a workaround:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant