Incus: idmap error

Having an issue with a couple of containers that have idmaps. Recently updated to Ubuntu 24.04 on the host, and Incus is version 6.4.

Relevant config:

raw.idmap: both 998 997
volatile.idmap.base: "1196608"
volatile.idmap.current: '[{"Isuid":true,"Isgid":false,"Hostid":1196608,"Nsid":0,"Maprange":997},{"Isuid":true,"Isgid":true,"Hostid":998,"Nsid":997,"Maprange":1},{"Isuid":true,"Isgid":false,"Hostid">
volatile.idmap.next: '[{"Isuid":true,"Isgid":false,"Hostid":1196608,"Nsid":0,"Maprange":997},{"Isuid":true,"Isgid":true,"Hostid":998,"Nsid":997,"Maprange":1},{"Isuid":true,"Isgid":false,"Hostid":11>

Getting the following error when trying to start the container:

lxc htpc 20240904122225.309 ERROR    idmap_utils - ../src/lxc/idmap_utils.c:lxc_map_ids:245 - newuidmap failed to write mapping "newuidmap: uid range [997-998) -> [998-999) not allowed": newuidmap 693
4 0 1196608 997 997 998 1 998 1197606 64538                                                                                                                                                             
lxc htpc 20240904122225.309 ERROR    start - ../src/lxc/start.c:lxc_spawn:1795 - Failed to set up id mapping.

Be grateful for ideas on how to address. Please let me know if any additional info needed.

Fixed by editing /etc/sub{uid,gid} to add root:998:1, and restarting Incus. Thanks to this post.

1 Like