LXC unprivileged container - operation no permitted
Linux - Virtualization and CloudThis forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
LXC unprivileged container - operation no permitted
After following Stephane Graber's instructions and several others who all point to his work, I cannot get unprivileged containers to work.
When trying to start the container after creation, which had no errors, I get this set of errors:
----------------------------------
$ lxc-start -n test1
chown: changing ownership of `/dev/pts/11': Operation not permitted
lxc_container: Failed to chown /dev/pts/11
lxc_container: Failed to shift tty into container
lxc_container: failed to initialize the container
lxc_container: The container failed to start.
--------------------------------------
Steps
1. create new user
2. ensure new user has subuid/gid range in /etc/subuid /etc/subgid
3. add range to /etc/lxc/lxc-usernet
4. create ~/userid/.confg/lxc/default.conf
5. create lxc instance
$ lxc-create -t download -n test1 -- -d ubuntu -r trusty -a amd64
6. check instance with lxc-ls --fancy, all looks good
7. lxc-start -n test1
8. Get the errors as listed.
Unprivileged usage was affected by kernel upgrade somewhere between 3.14.5 (which worked for me) and 3.14.12 which I recently tried (doing all the same stuff) but failed with same ownership messages as you. Fixes to accommodate whatever happened in the kernel have been included in new lxc release 1.0.5 (just out today from https://linuxcontainers.org/downloads/). I've tried it out and unprivileged container use is working again with no other changes needed.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.