Ich habe die ganze Zeit mit der config-Datei gearbeitet, die in dem Verzeichnis des images liegt
(/container/container-station-data/image/lxc/debian-buster/image) - ohne jeden Effekt für die Anweisung
lxc.cgroup.devices.allow = b 11:* rwm
Erst als ich die Anweisungen in die debian.common.conf eingetragen hatte, funktionierte es.
So sieht nun die debian.common.conf aus:
[/usr/share/lxc/config] # cat /usr/share/lxc/config/debian.common.conf
# This derives from the global common config
lxc.include = /usr/local/container-station/lxc/share/lxc/config/common.conf
# Doesn't support consoles in /dev/lxc/
lxc.devttydir =
# When using LXC with apparmor, the container will be confined by default.
# If you wish for it to instead run unconfined, copy the following line
# (uncommented) to the container's configuration file.
#lxc.aa_profile = unconfined
# If you wish to allow mounting block filesystems, then use the following
# line instead, and make sure to grant access to the block device and/or loop
# devices below in lxc.cgroup.devices.allow.
lxc.aa_profile = lxc-container-default-with-mounting
# Extra cgroup device access
## rtc
lxc.cgroup.devices.allow = c 254:0 rm
## tun
lxc.cgroup.devices.allow = c 10:200 rwm
## hpet
lxc.cgroup.devices.allow = c 10:228 rwm
## kvm
lxc.cgroup.devices.allow = c 10:232 rwm
## dvd
lxc.cgroup.devices.allow = b 11:* rwm
#lxc.mount.entry = /dev/sr0 dev/dvd-verbatim none bind,optional,create=file #USB-DVD
#lxc.mount.entry = /dev/sr1 dev/dvd-samsung none bind,optional,create=file #USB-DVD
## To use loop devices, copy the following line to the container's
## configuration file (uncommented).
#lxc.cgroup.devices.allow = b 7:* rwm
Alles anzeigen
Und das steht in der config-Datei:
[/usr/share/lxc/config] # cat /share/CACHEDEV6_DATA/software/container/container-station-data/image/lxc/debian-buster/image/config
# Template used to create this container: /usr/share/lxc/templates/lxc-download
# Parameters passed to the template: --dist debian --release buster --arch amd64
# For additional config options, please look at lxc.container.conf(5)
# Uncomment the following line to support nesting containers:
#lxc.include = /usr/share/lxc/config/nesting.conf
# (Be aware this has security implications)
# Distribution configuration
lxc.include = /usr/share/lxc/config/debian.common.conf
lxc.arch = x86_64
# Container specific configuration
lxc.rootfs = ./image/rootfs
lxc.rootfs.backend = dir
lxc.utsname = debian-buster
# allow mounting
# lxc.aa_profile = lxc-container-default-with-mounting
# lxc.cgroup.devices.allow = typeofdevice majornumber:minornumber rwm
# lxc.cgroup.devices.allow = b 11:* rwm
# Network configuration
lxc.network.type = veth
lxc.network.link = lxcbr0
lxc.network.flags = up
lxc.network.hwaddr = 00:16:3e:44:07:55
Alles anzeigen
Bestimmt gibt es eine Erklärung, warum die Anweisungen für lxc.aa_profile und lxc.cgroup.devices.allow in der allgemeinen (common) und nicht der speziellen config stehen muss.
Danach (als root) im Container die beiden USB-DVD-Drives einbinden mit:
sudo mknod -m 666 /dev/dvd-verbatim b 11 0
sudo mknod -m 666 /dev/dvd-samsung b 11 1
Dann kann man auf die DVD-Laufwerke zugreifen. Zumindest lesend. Das reicht mir - mehr wollte ich nicht.
PS: Die mount-entrys habe ich auskommentiert, weil sie bei mir nicht zu dem gewünschten Ergebnis führten: Im Container wurden die beiden Devices zwar angezeigt, aber ich konnte sie nicht auslesen. War dann nicht mehr motiviert genug, auch noch herauszufinden, wie das zum Laufen gebracht werden kann.
Danke fürs Mitlesen und Mitdenken