Created
January 24, 2023 03:29
-
-
Save AntaeusNar/47577502b7dd560d5ba1d52f558d8473 to your computer and use it in GitHub Desktop.
Proxmox USB to LXC Passthrough
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Based off of a lot of mess and reading: | |
| https://asokolsky.github.io/proxmox/octoprint.html | |
| https://medium.com/@konpat/usb-passthrough-to-an-lxc-proxmox-15482674f11d | |
| https://linuxcontainers.org/lxc/manpages/man5/lxc.container.conf.5.html | |
| However, I think that some of the general confusion is due to not understand what all of the different steps, commands, and files are doing. | |
| I managed to get it all to work reliably, and simply in 2 basic steps. | |
| Step 1) Find the USB you want to pass from the host to the lxc, and make sure it doesn't move. | |
| To find the usb you want: | |
| root@host: lsusb | |
| This will give you an ID number made of the vendor and the product, seperated by a colon. | |
| Use the ID number and the known subsystem in a new udev role to symlink the usb device to any name you like. | |
| Reload the udev roles and look run: | |
| root@host: ls -la /dev | |
| you will find a symlink from the orginal device to one you have named in the udev roles | |
| Step 2) Mount that symlink in the lxc | |
| edit /etc/pve/lxc/<lxc-id>.conf to include | |
| lxc.mount.entry: <source in host> <destination in lxc> none bind,optional,create=file | |
| USE THE SYMLINK YOU MADE IN STEP ONE AS THE SOURCE!!!!!! | |
| restart the lxc and your done! | |
| use user@lxc: lsusb and user@lxc: ls -la /dev to confirm it worked. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment