<p dir="ltr">You cannot create devices from the container. You need to create them beforehand outside rootfs and bind mount them in the container config.</p>
<p dir="ltr">This has been explained in detail on this list, so just do quick search for further info.</p>
<p dir="ltr">This only concerns lxd deployments as far as I know.</p>
<div class="gmail_quote">Op 1 jul. 2015 10:08 schreef "Tomasz Chmielewski" <<a href="mailto:mangoo@wpkg.org">mangoo@wpkg.org</a>>:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">In an unprivileged Ubuntu 14.04 container, I'm trying to run a program which needs to create device nodes.<br>
<br>
Unfortunately it fails:<br>
<br>
# pbuilder-dist trusty i386 create<br>
W: /root/.pbuilderrc does not exist<br>
I: Logging to /root/pbuilder/trusty-i386_result/last_operation.log<br>
I: Distribution is trusty.<br>
I: Current time: Wed Jul 1 07:25:49 UTC 2015<br>
I: pbuilder-time-stamp: 1435735549<br>
I: Building the build environment<br>
I: running debootstrap<br>
/usr/sbin/debootstrap<br>
mknod: '/var/cache/pbuilder/build/5377/./test-dev-null': Operation not permitted<br>
E: Cannot install into target '/var/cache/pbuilder/build/5377/.' mounted with noexec or nodev<br>
E: debootstrap failed<br>
W: Aborting with an error<br>
I: cleaning the build env<br>
I: removing directory /var/cache/pbuilder/build//5377 and its subdirectories<br>
<br>
<br>
So I've tried to add the following to container's config:<br>
<br>
lxc.cap.keep = CAP_MKNOD<br>
<br>
However, the container fails to start:<br>
<br>
lxc-start 1435737618.188 ERROR lxc_conf - conf.c:lxc_setup:3925 - Simultaneously requested dropping and keeping caps<br>
<br>
<br>
I don't see "mknod" dropped before in included configs:<br>
<br>
# grep -ri mknod /usr/share/lxc/config/*<br>
<br>
<br>
<br>
How can I let create custom device nodes?<br>
<br>
The host is running these versions:<br>
<br>
# dpkg -l|grep lxc<br>
ii liblxc1 1.1.2-0ubuntu3~ubuntu14.04.1~ppa1 amd64 Linux Containers userspace tools (library)<br>
ii lxc 1.1.2-0ubuntu3~ubuntu14.04.1~ppa1 amd64 Linux Containers userspace tools<br>
ii lxc-templates 1.1.2-0ubuntu3~ubuntu14.04.1~ppa1 amd64 Linux Containers userspace tools (templates)<br>
ii lxcfs 0.9-0ubuntu1~ubuntu14.04.1~ppa1 amd64 FUSE based filesystem for LXC<br>
ii python3-lxc 1.1.2-0ubuntu3~ubuntu14.04.1~ppa1 amd64 Linux Containers userspace tools (Python 3.x bindings)<br>
<br>
<br>
-- <br>
Tomasz Chmielewski<br>
<a href="http://wpkg.org" rel="noreferrer" target="_blank">http://wpkg.org</a><br>
<br>
_______________________________________________<br>
lxc-users mailing list<br>
<a href="mailto:lxc-users@lists.linuxcontainers.org" target="_blank">lxc-users@lists.linuxcontainers.org</a><br>
<a href="http://lists.linuxcontainers.org/listinfo/lxc-users" rel="noreferrer" target="_blank">http://lists.linuxcontainers.org/listinfo/lxc-users</a></blockquote></div>