Re: [libvirt] how to control usb read write perm

2013-04-25 Thread Guannan Ren

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 
channelsredirdev 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

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] how to control usb read write perm

2013-04-24 Thread yue
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 .
 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?
 
thanks  





--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list