[SOLVED] USB Pass through Failing in LXC Ubuntu 20.04

Jul 22, 2021
33
2
8
26
Hi, I am running a Ubuntu 20.04 LXC on top of PVE 6.4

I am trying to access an HSM module USB from LXC.

contents of lsusb:
Code:
Bus 001 Device 016: ID 1050:0030 Yubico.com

Using the lsusb details, I have trying mounting the below directory where My USB is mounted in the PVE Node.
Code:
/dev/bus/usb/001/016
to lxc by editing
Code:
/var/lib/lxc/102/config

to do so I have added these lines to the /var/lib/lxc/102/config file:
Code:
lxc.cgroup.devices.allow: c 189:* rwm
lxc.mount.entry: /dev/bus/usb/001/016 dev/bus/usb/001/016 none bind,optional,create=file

After saving the file. The moment I restart the container to apply the new configuration. the config file is resetting to the original file(Losing all the changes that I have made).


Regards.
 
It is working fine. I was editing the wrong file. I was editing the /var/lib/lxc/<name>/config . it started working fine once after adding the same config in /etc/pve/nodes/pve/lxc/<CTID>.conf.

Restarted the container. after changing the config file.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!