[pve-devel] [PATCH RFC container] Add device passthrough

Dominik Csapak d.csapak at proxmox.com
Fri Oct 20 09:51:43 CEST 2023


On 10/20/23 09:08, Wolfgang Bumiller wrote:
> On Thu, Oct 19, 2023 at 02:18:56PM +0200, Filip Schauer wrote:
>> Signed-off-by: Filip Schauer <f.schauer at proxmox.com>
>> ---
>> Is it reasonable to add a "dev[n]" argument to the pct.conf, given that
>> device mount points only allow passing through block devices?
> 
> Why would they only allow block devices?
> 
> Also, Dominik recently added resource mappings for qemu for USB & PCI.
> PCI might be tricky, but for USB we may be able to use these mappings as
> well.
> That said, "raw" `/dev` node pass-through still makes sense as a
> separate thing for containers anyway since raw `lxc....` entries in the
> container config can currently be very inconvenient to deal with
> particularly with unprivileged containers (read on below for why...)

just to chime in here, i don't think it'll be easily possible to reuse
the pci/usb maps as is since we'd have to map from pciid /usb-vendor/device
(or path) to a device node? i don't think thats generally possible, since
the driver does not always make that info easily available
(e.g. multi gpu setup and /dev/dri/cardX, or usb-to-serial adapters
and /dev/ttySX ?) i guess it could work, but we probably would have
to implement that for every driver out there?

what i would like to see however is to integrate a new type of mapping
for container devices specifically so that the ux is the same
(create mappings for whole cluster, assigning privileges, etc)

we still can provide a 'raw' mechanic as well for those who
only ever use root at pam on a single node, but I'd not be
against only using mappings either





More information about the pve-devel mailing list