Component
systemd-vmspawn
Is your feature request related to a problem? Please describe
Hi! 👋
In the Signstar project (cc @wiktor-k) we're currently evaluating the use of systemd-vmspawn for a virtualized test environment.
A requirement for this would be to forward a USB device of the host to the virtual machine.
Currently there seems to be no way to make use of qemu's -device options though.
See https://www.qemu.org/docs/master/system/devices/usb.html for more information on the topic.
Describe the solution you'd like
It would be great to enable users of systemd-vmspawn to - in some form - make use of the -device option that qemu offers, e.g. -device qemu-xhci -device usb-host,vendorid=0x1234,productid=0x5678.
Now, when thinking about this naively, this sounds easy, but I'm of course aware that for systemd this will be a bit more involved (given the security features it offers when it comes to services accessing device nodes).
However, maybe a specific/narrow abstraction over only the subset of required options for dealing with USB devices could be feasible and compatible with the security requirements and integration?
As of writing this, I'm not sure whether this is something on the roadmap for systemd-vmspawn or not.
However, I'd be happy to hear your thoughts on this matter.
Describe alternatives you've considered
Current alternatives are to use more full fledged solutions like libvirt, or less involved, more scripted solutions such as calling qemu directly from a shell script.
The systemd version you checked that didn't have the feature you are asking for
261.1
Component
systemd-vmspawn
Is your feature request related to a problem? Please describe
Hi! 👋
In the Signstar project (cc @wiktor-k) we're currently evaluating the use of
systemd-vmspawnfor a virtualized test environment.A requirement for this would be to forward a USB device of the host to the virtual machine.
Currently there seems to be no way to make use of
qemu's-deviceoptions though.See https://www.qemu.org/docs/master/system/devices/usb.html for more information on the topic.
Describe the solution you'd like
It would be great to enable users of
systemd-vmspawnto - in some form - make use of the-deviceoption that qemu offers, e.g.-device qemu-xhci -device usb-host,vendorid=0x1234,productid=0x5678.Now, when thinking about this naively, this sounds easy, but I'm of course aware that for systemd this will be a bit more involved (given the security features it offers when it comes to services accessing device nodes).
However, maybe a specific/narrow abstraction over only the subset of required options for dealing with USB devices could be feasible and compatible with the security requirements and integration?
As of writing this, I'm not sure whether this is something on the roadmap for
systemd-vmspawnor not.However, I'd be happy to hear your thoughts on this matter.
Describe alternatives you've considered
Current alternatives are to use more full fledged solutions like libvirt, or less involved, more scripted solutions such as calling
qemudirectly from a shell script.The systemd version you checked that didn't have the feature you are asking for
261.1