[libvirt] how to control usb read write perm
Guannan Ren
gren at redhat.com
Thu Apr 25 06:56:18 UTC 2013
On 04/25/2013 11:15 AM, yue wrote:
> hi,all
> i have 2 questions. both is related to spice usb redirect.
> 1. if i can control RW perm of usb device which is producted via
> spice ? in order to control user's rw operation in guestVM .
AFAIK currently, there is no such control on Read and Write
permission.
But you can use the following redirection filter to limit usb
devices
<usbdev> is a whitelist of filter policies.
<redirfilter>
<usbdev class='0x08' vendor='0x1234' product='0xbeef' version='2.00' allow='yes'/>
<usbdev allow='no'/>
</redirfilter>
> 2.if user have several usbs, and plug them at the same time when
> using spice client. if i can control which usb(s) can be accessed by
> user in guestVM?
The virtual machine need to add one or more USB redirection
channels<redirdev> first in to domain XML,
and these filter policies apply to them globally. For example:
<devices>
...
<redirdev bus='usb' type='spicevmc'>
<address type='usb' bus='0' port='2'/>
</redirdev>
<redirfilter>
<usbdev vendor='0x1234' product='0xbeef' allow='yes'/>
</redirfilter>
...
</devices>
About details see
:http://www.libvirt.org/formatdomain.html#elementsRedir
Guannan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130425/a3a34ec8/attachment-0001.htm>
More information about the libvir-list
mailing list