2.0.7.2 - unknown key lxc.idmap

4.9.0-6-amd64 #1 SMP Debian 4.9.88-1+deb9u1
lxc 2.0.7.2

trying to run an unprivileged container produces

lxc-start: confile.c: parse_line: 2008 unknown key lxc.idmap
lxc-start: parse.c: lxc_file_for_each_line: 57 Failed to parse config: lxc.idmap = u 0 100000 65536
lxc-start: tools/lxc_start.c: main: 284 Failed to create lxc_container

The container config containing

lxc.idmap = u 0 100000 65536
lxc.idmap = g 0 100000 65536

output from grep root /etc/sub* 2>/dev/null

/etc/subgid:root:100000:65536
/etc/subuid:root:100000:65536

What am I missing?

Given that you’re on 2.0 the correct key for idmappings is lxc.id_map. The key has first changed to lxc.idmap starting with 2.1.

1 Like

Thank you for the input! Had looked through the online documentation which though seems to feature only the syntax pertaining to the most recent version but no diversifaction for previous versions.

Unfortunately some distros are a bit slow(er) with adopting package updates from upstream, e.g. Debian-Stretch is providing lxc 2.0.7.2 in the stable channel. That makes it harder to keep up with changes in the documented syntax.