Welcome to the Linux Foundation Forum!

lxc_map_ids: 3668 newuidmap failed to write mapping "newuidmap: uid range [0-1) -> [231072-231073) n

Here is my defualt.conf: cat ~/.config/lxc/default.conf

lxc.net.0.type = veth
lxc.net.0.link = lxcbr0
lxc.net.0.flags = up
lxc.net.0.hwaddr = 00:16:3e:xx:xx:xx
lxc.idmap = u 0 231072 65536
lxc.idmap = g 0 231072 65536

getting the following error after running: lxc-create --template download --name unpriv-cont-user

lxc-create: unpriv-cont-user: conf.c: lxc_map_ids: 3668 newuidmap failed to write mapping "newuidmap: uid range [0-1) -> [231072-231073) not allowed": newuidmap 47807 0 231072 1 1001 1001 1
lxc-create: unpriv-cont-user: conf.c: userns_exec_mapped_root: 5552 Error setting up {g,u}id mappings for child process "47807"
lxc-create: unpriv-cont-user: utils.c: wait_exited: 344 Child terminated with error 1
lxc-create: unpriv-cont-user: lxccontainer.c: do_create_container_dir: 1234 No such file or directory - Failed to chown rootfs "/home/student/.local/share/lxc/unpriv-cont-user"
lxc-create: unpriv-cont-user: lxccontainer.c: __lxcapi_create: 1817 Failed to create container unpriv-cont-user
lxc-create: unpriv-cont-user: tools/lxc_create.c: main: 317 Failed to create container unpriv-cont-user

Comments

  • chrispokorni
    chrispokorni Posts: 1,842

    Hi @alireza1222,

    To help better understand your environment please provide the cloud provider or hypervisor used to provision the VM, and the outputs of the following commands:

    whoami

    cat /etc/lxc/lxc-usernet

    cat /etc/subuid

    cat /etc/subgid

    getfacl -n ~/.local

    Regards,
    -Chris

Categories

Upcoming Training