{{tag>lxc virtualization containers proxmox}} ====== Change privileged to unprivileged container in Proxmox====== In Proxmox add this to ///etc/pve/lxc/container_number.conf// (mount.entry was added for openvpn) unprivileged: 1 lxc.mount.entry: /dev/net dev/net none bind,create=dir lxc.idmap = u 0 100000 65536 lxc.idmap = g 0 100000 65536 ===== Install ===== apt install python3-pylibacl ===== Run script ===== {{ :wiki:change_perms.py |Python3 script}} Make sure the 2nd argument is correct, which is offset from current values in lxc rootfs i.e. if the owner is 200000 executing the script below will set owner to 300000: ./change_perms.py /rpool/data/subvol-103-disk-1/ 100000 Adapt ///etc/pve/lxc/container_number.conf// and ///etc/subuid// and ///etc/subgid// accordingly. ====== Tested on ====== * ====== See also ====== * [[Change ulimits on unprivileged containers]] * [[Create container]] * [[Moving lxc containers]] * [[lxc troubleshooting]] ====== References ====== * http://tbrink.science/blog/2017/06/20/converting-privileged-lxc-containers-to-unprivileged-containers/ (NOTE:id_map is deprecated)