[nova] Do openstack support USB passthrough

Julia Kreger juliaashleykreger at gmail.com
Wed Jan 4 14:30:37 UTC 2023


On Wed, Jan 4, 2023 at 2:05 AM Tim Bell <Tim.Bell at cern.ch> wrote:

>
>
> > On 3 Jan 2023, at 20:03, Sean Mooney <smooney at redhat.com> wrote:
> >
> > On Tue, 2023-01-03 at 14:54 +0000, Stephen Finucane wrote:
> >> On Mon, 2022-12-26 at 10:04 +0000, 韩光宇 wrote:
> >>> Hi, all
> >>>
> >>> I want to ask if openstack support USB passthrough now?
> >>>
> >>> Or if I want the instance to recognize the USB flash drive on the
> >>> host, do you have any suggestions?
> >>>
> >>> Thanks,
> >>> Han
> >>
> >> This isn't supported in nova and probably never will be. The closest
> you can get
> >> is to passthrough an entire USB controller as suggested by this blog
> [1], but
> >> that's really a hack and I 100% would not use it in production.
> >
> > ya so we have discussed usb passthough supprot a few times and its
> somethign nova could add but there has
> > neither been the demand or desire to add it stongly enough in the core
> team to actully do it.
> >
> > the shorted path to enableing usb passthoug would likely be to add
> support to cyborg and then add support for that ot nova.
> > i am perhaps the most open of the nova cores to supporting usb
> passthough since i have wanted to add it in the past but
> > if we were to support it it would have to be similar to howe we support
> pci passhtough. static provisioning and likely only of
> > stateless devices which rules out usb falsh drives.
> >
> > usb gps recivers for precision time stamping was one of the usecause
> raised in the past which we were somewhat open too
> > the other was usb programmers/debuggers forh cases when vms where used
> in industral test and automation workflows.
> >
> > as stephen said the only way to do it today is to piggyback on pci
> passthough and passhtough a usb contoller not a single device.
> >
> > if we were to ever support this in nova directly i would proably extend
> the pci tracker or support other buses like usb or use the generic
> > resouce table created for persistent memory to model the devices. in
> eitehr case we would want this capablity to be placement native from the
> > start if we added this capablity so it would be more and less work then
> you might imagine to do this right.
> > less work if we maintain the requirement for statless devices only (ie
> no usb flash drives) more if you also need to handel multi tenancy and
> > move operation include data copying, erasure and or encypetion.
> >
> > i would not expect this to change in the next few release unless
> multiple operators provide feedback that this is a broadly deired capablity.
> > with out a top level generic device api for mutple type of devices
> (vgpu, usb, pci) that was decoupled form the flaovr or an abstraction like
> > the cyborg device-profile or pci alias it is hard to see a clean way to
> model this in our api. that is why enabling it in cyborg and then extneding
> > nova ot support device profiles with a device type of usb is the simplar
> solution  form a nova perspecitve but that is non trivial from an
> operational
> > perspective as you requrie cyborg to utilise the feature. doing it via a
> usb_alias in the flavor has all the draw backs of the pci_alias, static
> > configuration that must match on all compute nodes and futher
> proliferation of flavor explostion. this is one of the reasons we have not
> added this in
> > the past.  the work to do it in the libvirt driver would not be hard but
> the maintaince and operational overhead of using it for operators is non
> > trivial.
> >
> >>
> >> Stephen
> >>
> >> [1] https://egallen.com/openstack-usb-passthrough/
> >>
> >>
>
> One intermedia option may be to use a usb over ip driver in the guest. I
> think we used this for one of our use cases (a license server with a
> dongle).
>
> Tim
>
> >
> >
>
>
I didn't know such a thing existed! Are there any links or blog posts out
there which are recommended?

Every time I've ever had to pass USB through to a VM, it was purely because
of a hardware key for licensing.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.openstack.org/pipermail/openstack-discuss/attachments/20230104/dc3c7331/attachment.htm>


More information about the openstack-discuss mailing list