I’m giving an update on this topic
Well I first tried to use “propagation” option for lxc config device but seems not working in my ubuntu 18.04 (LXD 3.0.3):
Invalid device configuration key for disk: propagation
I got more or less some success by following these steps:
- load the cdrom on drive
- unmount on host (was automounted)
- type:
lxc config device add ubuntu1804 cdrom disk readonly=true source=/dev/sr0 path=/mnt/cdrom
then I was able to use the cdrom inside my container ubuntu1804
For changing CD, typed:
lxc config device remove ubuntu1804 cdrom
Then did steps 1 to 3 again with another CD
Works but not exactly as I wanted by giving full control inside the container : load cdrom in drive, then just mount it inside the container