[Spice-devel] how to limit redirected usb show in guestVM

Hans de Goede hdegoede at redhat.com
Thu Apr 25 03:15:29 PDT 2013


Hi,

On 04/25/2013 10:25 AM, David Jaša wrote:
> bigclouds píše v Čt 25. 04. 2013 v 09:41 +0800:
>> hi,all
>> if user has several usb, and plug them at the same time when using
>> spice-client. all usb devices will be present in guestVM.
>> i want to know   if i can control which usb device can be present in
>> guestVM?
>
> Yes, you can, using filter string. There is actually a default filter
> string in the client that prevents auto-redirection of USB HID devices
> (keyboard and mouse).
>
> Filter string can be set on client side (this one controls
> auto-redirection) or on server-side (this enforces that disabled devices
> can not be redirected to the guest). The basic format is
> "class,vendor,device,revision,enable" with "-1" as a wildcard, so when
> you launch client with:
> --spice-usbredir-auto-redirect-filter="-1,-1,-1,-1,0"
> no USB device will be auto-redirected. If you specifiy "-1,-1,-1,-1,0|
> 8,-1,-1,-1,1", only USB mass storage devices will be auto-redirected.
>
> The full documentation of filter string used to be on Hans's site:
> http://people.fedoraproject.org/~jwrdegoede/spice-reference/SpiceUsbDeviceManager.html#SpiceUsbDeviceManager--auto-connect-filter
> but it seems to be gone now. Hans, where does it reside now, please?

I removed it while cleaning up my fedorapeople web-space, but we still
don't have an official place for it AFAIK, so I've put it back.

So now the above link should work again :)

Regards,

Hans


More information about the Spice-devel mailing list