Failed initializing instance: Invalid config: No uid/gid allocation configured

Hi all,

incus launch images:debian/12/cloud

returns this error on my Debian 12 host machine:

Error: Failed instance creation: Failed creating instance record: Failed initializing instance: Invalid config: No uid/gid allocation configured. In this mode, only privileged containers are supported

I think this has something to do with /etc/sub{g,u}id, but I don’t know how that must be set to be able to run unprivileged incus containers.

There are lots of discussions on this topic including this one:
https://discuss.linuxcontainers.org/t/incus-no-uid-gid-allocation-configured/19002
incus consumes uid/gid map allocations for the root user.

A normal setup is:
root:1000000:1000000000
In both uidmap and gidmap.

sudo systemctl restart incus