From: Florian Heiber <florian@heiber.me>
To: pve-user@lists.proxmox.com
Subject: [PVE-User] USB device passthrough
Date: Wed, 29 Dec 2021 10:55:26 +0100 [thread overview]
Message-ID: <C4481362-7FB1-477C-AC57-F272146482AC@heiber.me> (raw)
Hi all,
I’m trying to pass multiple USB devices from my host through into my container. I’ve followed a few tutorials ([1], [2]) that describe the process, but I can’t get it to work.
What have I done?
I have connected the USB devices to my host. I can confirm that they work via /dev/ttyUSB0, etc. I created a udev rule to consistently have them available as /dev/reader0, etc. I can also confirm that I can use those aliases as if I was using the original device. I consider this a success.
I updated the container’s configuration at, in this case, /etc/pve/lxc/109.conf to include my mount points:
lxc.cgroup.devices.allow: c 7:* rwm
lxc.mount.entry: /dev/reader0 dev/reader0 none bind,optional,create=file
After a reboot of the container, the device appears as configured. Unfortunately, I looks like I have some issues with my permissions. When I try to print out the data coming from the reader, I only see a
florian@datalogger:~$ cat /dev/reader0 | od -tx1
cat: /dev/reader0: Permission denied
0000000
This does, however, work as expected when I run this on the host itself.
Does anyone see what I’m missing here? One point I’m not too sure about is the major part in the lxc.cgroup.devices.allow line. I suppose it should reflect the major part of the device I'm trying to expose, but some tutorials used the one of the original device (/dev/ttyUSB0 in my case, 188) here.
Thank you for your time!
All the best,
– Florian
[1]: https://drozmotix.github.io/languages/en/BasicSetup/03.ProxmoxLXC.html#what-is-lxc
[2]: https://deviant.engineer/2016/11/lxc-passthrough/
next reply other threads:[~2021-12-29 10:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-29 9:55 Florian Heiber [this message]
[not found] <mailman.404.1640776473.300.pve-user@lists.proxmox.com>
2021-12-30 10:45 ` Florian Heiber
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=C4481362-7FB1-477C-AC57-F272146482AC@heiber.me \
--to=florian@heiber.me \
--cc=pve-user@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox