Hello,
I have a LXC container that i use only sporadically.
It has a USB card reader passthrough configured like this:
This has worked the last time i used the container in PVE 6.x.
It stopped working with PVE 7.0. I always got the error
It was not a huge issue before but not i need the container again and experimented a bit.
I have gotten the passthrough working by doing the following:
Is there anything that i can change in the config to get the lxc.mount.entry to work?
Is it possible to automate the lxc-device add commands with the container start?
I have a LXC container that i use only sporadically.
It has a USB card reader passthrough configured like this:
Code:
arch: amd64
cores: 2
features: nesting=1
hostname: homecard01
memory: 2048
net0: name=eth0,bridge=vmbr100,firewall=1,hwaddr=xxxxxxxxx,ip=dhcp,type=veth
ostype: debian
rootfs: Fast-Pool:subvol-134-disk-0,mountoptions=noatime,size=8G
swap: 0
lxc.cgroup.devices.allow: c 188:* rwm
lxc.mount.entry: /dev/card01 dev/card01 none bind,optional,create=file,mode=0666
This has worked the last time i used the container in PVE 6.x.
It stopped working with PVE 7.0. I always got the error
operation not permitted
when accessing the card readerIt was not a huge issue before but not i need the container again and experimented a bit.
I have gotten the passthrough working by doing the following:
- remove the config entry:
lxc.mount.entry: /dev/card01 dev/card01 none bind,optional,create=file,mode=0666
- Start the container
- run the following command
lxc-device add -n 134 /dev/card01
- after this i was able to access the card reader without error but I could not actually use it in my program.
- To get this to work i had to also passthrough the usb device itself:
lxc-device add -n 134 /dev/bus/usb/001/003
Is there anything that i can change in the config to get the lxc.mount.entry to work?
Is it possible to automate the lxc-device add commands with the container start?