[pve-devel] [PATCH] Add UI option for boot optional mapped usb device
Dominik Csapak
d.csapak at proxmox.com
Wed Dec 4 10:40:04 CET 2024
Hi,
thanks for wanting to contribute!
First, did you already see https://pve.proxmox.com/wiki/Developer_Documentation ?
(especially the CLA part at the end?)
Just a few high level comments/questions to the approach (did not look too much at the code yet).
Please correct me if I'm wrong, but my guess why you want this is to emulate
the behavior for 'raw' USB passed through devices? (since those don't have to
be there for the vm to start?)
I think maybe such a setting would be better suited on the mapping itself?
I say this because the mapping defines which devices can/should be used, so
there is IMHO the right part to decide if it should be used in a guest
when it's missing.
Also I'm not very sure if we'd need a setting for this at all, since
the 'raw' passthrough also simply pass it through.
Just for your understanding, the reason it's currently implemented this way
is to prevent booting a VM with a wrong device (at least when using the path),
or a without one since that can have bad consequences (depending on what the
guest does with the device and what devices are connected)
Additionally we currently don't properly track the use of usb devices on our
side (which can have weird side effects, e.g. if you try to pass the same
device to multiple running vms at the same time) but this is not really
possible when using vendor/device ids since there could be mulitple such devices.
with kind regards
Dominik
More information about the pve-devel
mailing list