<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">On 04/25/2013 11:15 AM, yue wrote:<br>
    </div>
    <blockquote
      cite="mid:44a9d41c.5181.13e3f30194e.Coremail.libvirt@163.com"
      type="cite">
      <div
        style="line-height:1.7;color:#000000;font-size:14px;font-family:arial">
        <div style="color: rgb(0, 0, 0); line-height: 1.7; font-family:
          arial; font-size: 14px;">
          <div style="color: rgb(0, 0, 0); line-height: 1.7;
            font-family: arial; font-size: 14px;">
            <div>hi,all  </div>
            <div>i have 2 questions. both is related to spice usb
              redirect.</div>
            <div>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 .</div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
           AFAIK currently, there is no such control on Read and Write
    permission.<br>
           But you can use the following redirection filter to limit usb
    devices<br>
           <usbdev> is a whitelist of filter policies.<br>
    <pre>     <redirfilter>
       <usbdev class='0x08' vendor='0x1234' product='0xbeef' version='2.00' allow='yes'/>
       <usbdev allow='no'/>
     </redirfilter></pre>
    <br>
    <br>
    <blockquote
      cite="mid:44a9d41c.5181.13e3f30194e.Coremail.libvirt@163.com"
      type="cite">
      <div
        style="line-height:1.7;color:#000000;font-size:14px;font-family:arial">
        <div style="color: rgb(0, 0, 0); line-height: 1.7; font-family:
          arial; font-size: 14px;">
          <div style="color: rgb(0, 0, 0); line-height: 1.7;
            font-family: arial; font-size: 14px;">
            <div> 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?</div>
            <div> </div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
          The virtual machine need to add one or more USB redirection
    channels<redirdev> first in to domain XML,<br>
          and these filter policies apply to them globally. For example:<br>
    <br>
          <devices><br>
            ...    <br>
            <redirdev bus='usb' type='spicevmc'><br>
              <address type='usb' bus='0' port='2'/><br>
            </redirdev><br>
            <redirfilter><br>
              <usbdev vendor='0x1234' product='0xbeef'
    allow='yes'/><br>
            </redirfilter><br>
            ...<br>
          </devices><br>
    <br>
          About details see
    :<a class="moz-txt-link-freetext" href="http://www.libvirt.org/formatdomain.html#elementsRedir">http://www.libvirt.org/formatdomain.html#elementsRedir</a><br>
    <br>
          Guannan<br>
    <br>
  </body>
</html>