Instead of the default lxc idmap (u/g 0 100000 65536), I'd like to use a different range as the default mapping for containers. I changed /etc/subuid and /etc/subgid to reflect the ranges I want, but I can't find anything on how I would configure proxmox to create containers with the new ids instead of [100000,165536). As a result, I get the following error when I try to create an lxc container in the proxmox gui:
Adding the lxc.idmap lines to /etc/lxc/default.conf had no effect, and I haven't been able to find any information on how to configure the idmap used by proxmox in the initial lxc creation. Is it possible to change this, or is the only option to restore the original subuid / subgid ranges and manually set up the id mappings in /etc/pve/lxc/<container>.conf?
Code:
extracting archive '/var/lib/vz/template/cache/ubuntu-22.04-standard_22.04-1_amd64.tar.zst'
lxc 20220531090123.868 ERROR conf - conf.c:lxc_map_ids:3668 - newuidmap failed to write mapping "newuidmap: uid range [0-65536) -> [100000-165536) not allowed": newuidmap 2264132 0 100000 65536
Failed to write id mapping for child process
lxc 20220531090123.868 ERROR utils - utils.c:lxc_drop_groups:1363 - Operation not permitted - Failed to drop supplimentary groups
lxc 20220531090123.868 ERROR utils - utils.c:lxc_switch_uid_gid:1338 - Invalid argument - Failed to switch to gid 0
TASK ERROR: unable to create CT 100 - command 'lxc-usernsexec -m u:0:100000:65536 -m g:0:100000:65536 -- tar xpf - --zstd --totals --one-file-system -p --sparse --numeric-owner --acls --xattrs '--xattrs-include=user.*' '--xattrs-include=security.capability' '--warning=no-file-ignored' '--warning=no-xattr-write' -C /var/lib/lxc/100/rootfs --skip-old-files --anchored --exclude './dev/*'' failed: exit code 1
Adding the lxc.idmap lines to /etc/lxc/default.conf had no effect, and I haven't been able to find any information on how to configure the idmap used by proxmox in the initial lxc creation. Is it possible to change this, or is the only option to restore the original subuid / subgid ranges and manually set up the id mappings in /etc/pve/lxc/<container>.conf?