[lxc-users] lxc-device not persistent ?

Serge Hallyn serge.hallyn at ubuntu.com
Thu May 28 06:30:24 UTC 2015


You presumably have an autodev.  This means a tmpfs is mounted under
the container's /dev.  To create devices in there, use the
lxc.hook.autodev.  (See lxc.container.conf(5) manpage)

Quoting arteta (arteta22000 at gmail.com):
> Hello,
> 
> Sorry for English Translator.
> I updated my ubuntu yesterday ( 15.04 -> 15.10 ) . Since then, the links I had created earlier with "lxc-device" no longer appear in the containers.
> 
> _________________________
> root at core:/var/lib/lxc# cat tvheadend/config 
> # Template used to create this container: /usr/share/lxc/templates/lxc-debian
> # Parameters passed to the template:
> # For additional config options, please look at lxc.container.conf(5)
> lxc.network.type = veth
> lxc.network.link = br0_dmz
> lxc.network.flags = up
> lxc.network.hwaddr = 00:16:3e:xx:xx:xx
> lxc.rootfs = /var/lib/lxc/tvheadend/rootfs
> lxc.start.auto = 1
> 
> # Common configuration
> lxc.include = /usr/share/lxc/config/debian.common.conf
> 
> # Container specific configuration
> lxc.mount = /var/lib/lxc/tvheadend/fstab
> lxc.utsname = tvheadend
> lxc.arch = amd64
> lxc.cgroup.devices.allow = c 212:* ram
> _________________________
> 
> 
> "lxc.aa_profile = unconfined" in /usr/share/lxc/config/debian.common.conf
> 
> _____________________
> var/lib/lxc# ll tvheadend/rootfs/dev/dvb/adapter0/
> total 8
> drwxr-xr-x 2 root root    4096 mars  13 22:20 ./
> drwxr-xr-x 3 root root    4096 mars  13 22:17 ../
> crw-rw---- 1 root video 212, 0 mars  13 22:19 demux0
> crw-rw---- 1 root video 212, 1 mars  13 22:19 dvr0
> crw-rw---- 1 root video 212, 3 mars  13 22:19 frontend0
> crw-rw---- 1 root video 212, 2 mars  13 22:20 net0
> _____________________
> 
> 
> ______________________
> root at core:/var/lib/lxc# lxc-start -n tvheadend  -d
> root at core:/var/lib/lxc# lxc-console -n tvheadend 
> 
> Connected to tty 1
> Type <Ctrl+a q> to exit the console, <Ctrl+a Ctrl+a> to enter Ctrl+a itself
> 
> 
> Debian GNU/Linux 7 tvheadend tty1
> 
> tvheadend login: root
> Password: 
> Last login: Sat May 23 16:58:27 CEST 2015 from 192.168.1.22 on pts/4
> Linux tvheadend 3.19.0-18-generic #18-Ubuntu SMP Tue May 19 18:31:35 UTC 2015 x86_64
> 
> The programs included with the Debian GNU/Linux system are free software;
> the exact distribution terms for each program are described in the
> individual files in /usr/share/doc/*/copyright.
> 
> Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
> permitted by applicable law.
> root at tvheadend:~# ll /dev/
> total 0
> crw-rw---- 1 root tty  136, 2 mai   24 10:53 console
> lrwxrwxrwx 1 root root     13 mai   24 10:53 fd -> /proc/self/fd
> crw-rw-rw- 1 root root   1, 7 mai   24 10:53 full
> crw-rw-rw- 1 root root   1, 3 mai   24 10:53 null
> lrwxrwxrwx 1 root root     13 mai   24 10:53 ptmx -> /dev/pts/ptmx
> drwxr-xr-x 2 root root      0 mai   24 10:53 pts
> crw-rw-rw- 1 root root   1, 8 mai   24 10:53 random
> lrwxrwxrwx 1 root root      8 mai   24 10:53 shm -> /run/shm
> lrwxrwxrwx 1 root root     15 mai   24 10:53 stderr -> /proc/self/fd/2
> lrwxrwxrwx 1 root root     15 mai   24 10:53 stdin -> /proc/self/fd/0
> lrwxrwxrwx 1 root root     15 mai   24 10:53 stdout -> /proc/self/fd/1
> crw-rw-rw- 1 root root   5, 0 mai   24 10:53 tty
> crw------- 1 root tty  136, 0 mai   24  2015 tty1
> crw-rw---- 1 root tty  136, 1 mai   24 10:53 tty2
> crw-rw---- 1 root tty  136, 2 mai   24 10:53 tty3
> crw-rw---- 1 root tty  136, 3 mai   24 10:53 tty4
> crw-rw-rw- 1 root root   1, 9 mai   24 10:53 urandom
> crw-rw-rw- 1 root root   1, 5 mai   24 10:53 zero
> root at tvheadend:~# 
> ______________________
> 
> there is a new parameter for this case ?
> Hard to understand why this configuration no longer works. The version of lxc was almost identical I believe between 15.04 and 15.10.
> 
> Thank you for your answers !
> 
> 
> 
> Guillaume.
> 

> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users



More information about the lxc-users mailing list