<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 01/07/2015 06:37 AM, Cole Robinson
      wrote:<br>
    </div>
    <blockquote cite="mid:54AD44BE.8080003@redhat.com" type="cite">
      <pre wrap="">On 01/06/2015 12:08 AM, Frederick N. Brier wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="">I'm using Spice and want to share a USB device on workstation with a VM
running on another physical host.  The filters are all set up for the VM in
its domain XML.  The Spice "Select USB devices for redirection" dialog shows
the device I want to redirect.  However, all the USB devices are greyed out
and Alert text says, "Some USB devices are blocked by host policy".  My
understanding, from the doc
<a class="moz-txt-link-rfc2396E" href="https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Virtualization_Administration_Guide/sect-limit-redirection.html">&lt;https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Virtualization_Administration_Guide/sect-limit-redirection.html&gt;</a>,
is that the following XML needs to be configured on the "host physical
machine's domain XML" which I am interpreting as the workstation, although it
could be the hypervisor host, to unblock the USB device:

&lt;redirfilter&gt;
  &lt;usbdev class='0x08' vendor='0x0951' product='0x1625' version='2.0' allow='yes'/&gt;
  &lt;usbdev allow='no'/&gt;
&lt;/redirfilter&gt;

Either way, I cannot figure out what the name or location of the file where
this XML would go, let alone find a complete schema or example of what the
file would look like.  Has anyone else done this?  Please... &lt;gasp&gt; Help!

</pre>
      </blockquote>
      <pre wrap="">
I've never seen that message before. Can you provide the guest XML you are
using? And maybe upload a screenshot somewhere of what you are seeing in
virt-viewer.

What type of device are you trying to passthrough?

CCing hans who is the usbredir expert

- Cole
</pre>
    </blockquote>
    <br>
    The guest XML is below.  There is an extra &lt;redirdev&gt; element
    in the XML, which got added when I was attempting to use a
    virt-manager 1.0.1 on my Fedora 20 workstation remotely connected to
    the CentOS KVM host, but it was doing this before as well.  A
    snapshot of the dialog can be found at <a
      href="http://snag.gy/8UViT.jpg">http://snag.gy/8UViT.jpg</a> . 
    The Alert message appears to be in the <a
      href="https://github.com/mathslinux/spice-gtk">spice-gtk project</a>
    in the <a
href="https://github.com/mathslinux/spice-gtk/blob/master/gtk/usb-device-manager.c">usb-device-manager.c</a>
    file.  Initially, I used remote-viewer with no parameters and
    specified the URI (<a class="moz-txt-link-freetext" href="spice://cyclone:5908">spice://cyclone:5908</a>) in its dialog, but then I
    created an INI file passed to remote-viewer.  That file's contents
    are also below.  There was no difference in the behavior.  Now
    please don't laugh, but I was trying to pass the "Hercules Rocksmith
    USB Guitar Adapter" to the VM.  It would kind of cool and geeky to
    be able to play Rocksmith 2014 in a remote VM on my Fedora box. 
    Thank you for the help.<br>
    <br>
    - Fred<br>
    <br>
    ---------Start----------<br>
    [virt-viewer]<br>
    type=spice<br>
    host=cyclone<br>
    port=5908<br>
    title=Rain<br>
    fullscreen=1<br>
    enable-usbredir=1<br>
    enable-usb-autoshare=1<br>
    usb-filter=-1,12ba,00ff,-1,yes<br>
    ---------End----------<br>
    <br>
    &lt;domain type='kvm' id='21'&gt;<br>
      &lt;name&gt;Rain&lt;/name&gt;<br>
      &lt;uuid&gt;bc456b4a-cc10-4be5-b5a5-92e54be74025&lt;/uuid&gt;<br>
      &lt;title&gt;Windows 7 on Cyclone&lt;/title&gt;<br>
      &lt;description&gt;This VM is for running non-games applications
    that only run under Windows.  The installed applications include XML
    Spy 2004 Pro, Quickbooks 2012, Chief Architect&amp;apos;s
    Architectural Home Design, and Visual Studio.&lt;/description&gt;<br>
      &lt;memory unit='KiB'&gt;4194304&lt;/memory&gt;<br>
      &lt;currentMemory unit='KiB'&gt;4194304&lt;/currentMemory&gt;<br>
      &lt;vcpu placement='static'&gt;2&lt;/vcpu&gt;<br>
      &lt;os&gt;<br>
        &lt;type arch='x86_64' machine='rhel6.5.0'&gt;hvm&lt;/type&gt;<br>
        &lt;boot dev='hd'/&gt;<br>
      &lt;/os&gt;<br>
      &lt;features&gt;<br>
        &lt;acpi/&gt;<br>
        &lt;apic/&gt;<br>
        &lt;pae/&gt;<br>
      &lt;/features&gt;<br>
      &lt;clock offset='localtime'&gt;<br>
        &lt;timer name='rtc' tickpolicy='catchup'/&gt;<br>
        &lt;timer name='pit' tickpolicy='delay'/&gt;<br>
        &lt;timer name='hpet' present='no'/&gt;<br>
      &lt;/clock&gt;<br>
      &lt;on_poweroff&gt;destroy&lt;/on_poweroff&gt;<br>
      &lt;on_reboot&gt;restart&lt;/on_reboot&gt;<br>
      &lt;on_crash&gt;restart&lt;/on_crash&gt;<br>
      &lt;devices&gt;<br>
        &lt;emulator&gt;/usr/libexec/qemu-kvm&lt;/emulator&gt;<br>
        &lt;disk type='block' device='disk'&gt;<br>
          &lt;driver name='qemu' type='raw' cache='none'
    io='native'/&gt;<br>
          &lt;source dev='/dev/vg_data/rain'/&gt;<br>
          &lt;target dev='vda' bus='virtio'/&gt;<br>
          &lt;alias name='virtio-disk0'/&gt;<br>
          &lt;address type='pci' domain='0x0000' bus='0x00' slot='0x08'
    function='0x0'/&gt;<br>
        &lt;/disk&gt;<br>
        &lt;disk type='block' device='disk'&gt;<br>
          &lt;driver name='qemu' type='raw' cache='none'
    io='native'/&gt;<br>
          &lt;source dev='/dev/vg_data/windata'/&gt;<br>
          &lt;target dev='vdb' bus='virtio'/&gt;<br>
          &lt;alias name='virtio-disk1'/&gt;<br>
          &lt;address type='pci' domain='0x0000' bus='0x00' slot='0x09'
    function='0x0'/&gt;<br>
        &lt;/disk&gt;<br>
        &lt;disk type='block' device='cdrom'&gt;<br>
          &lt;driver name='qemu' type='raw'/&gt;<br>
          &lt;source dev='/dev/sr0'/&gt;<br>
          &lt;target dev='hdc' bus='ide'/&gt;<br>
          &lt;readonly/&gt;<br>
          &lt;alias name='ide0-1-0'/&gt;<br>
          &lt;address type='drive' controller='0' bus='1' target='0'
    unit='0'/&gt;<br>
        &lt;/disk&gt;<br>
        &lt;controller type='usb' index='0' model='ich9-ehci1'&gt;<br>
          &lt;alias name='usb0'/&gt;<br>
          &lt;address type='pci' domain='0x0000' bus='0x00' slot='0x05'
    function='0x7'/&gt;<br>
        &lt;/controller&gt;<br>
        &lt;controller type='usb' index='0' model='ich9-uhci1'&gt;<br>
          &lt;alias name='usb0'/&gt;<br>
          &lt;master startport='0'/&gt;<br>
          &lt;address type='pci' domain='0x0000' bus='0x00' slot='0x05'
    function='0x0' multifunction='on'/&gt;<br>
        &lt;/controller&gt;<br>
        &lt;controller type='usb' index='0' model='ich9-uhci2'&gt;<br>
          &lt;alias name='usb0'/&gt;<br>
          &lt;master startport='2'/&gt;<br>
          &lt;address type='pci' domain='0x0000' bus='0x00' slot='0x05'
    function='0x1'/&gt;<br>
        &lt;/controller&gt;<br>
        &lt;controller type='usb' index='0' model='ich9-uhci3'&gt;<br>
          &lt;alias name='usb0'/&gt;<br>
          &lt;master startport='4'/&gt;<br>
          &lt;address type='pci' domain='0x0000' bus='0x00' slot='0x05'
    function='0x2'/&gt;<br>
        &lt;/controller&gt;<br>
        &lt;controller type='scsi' index='0' model='virtio-scsi'&gt;<br>
          &lt;alias name='scsi0'/&gt;<br>
          &lt;address type='pci' domain='0x0000' bus='0x00' slot='0x0a'
    function='0x0'/&gt;<br>
        &lt;/controller&gt;<br>
        &lt;controller type='ide' index='0'&gt;<br>
          &lt;alias name='ide0'/&gt;<br>
          &lt;address type='pci' domain='0x0000' bus='0x00' slot='0x01'
    function='0x1'/&gt;<br>
        &lt;/controller&gt;<br>
        &lt;controller type='virtio-serial' index='0'&gt;<br>
          &lt;alias name='virtio-serial0'/&gt;<br>
          &lt;address type='pci' domain='0x0000' bus='0x00' slot='0x06'
    function='0x0'/&gt;<br>
        &lt;/controller&gt;<br>
        &lt;interface type='bridge'&gt;<br>
          &lt;mac address='52:54:00:9c:35:fc'/&gt;<br>
          &lt;source bridge='br0'/&gt;<br>
          &lt;target dev='vnet8'/&gt;<br>
          &lt;model type='virtio'/&gt;<br>
          &lt;alias name='net0'/&gt;<br>
          &lt;address type='pci' domain='0x0000' bus='0x00' slot='0x03'
    function='0x0'/&gt;<br>
        &lt;/interface&gt;<br>
        &lt;serial type='pty'&gt;<br>
          &lt;source path='/dev/pts/9'/&gt;<br>
          &lt;target port='0'/&gt;<br>
          &lt;alias name='serial0'/&gt;<br>
        &lt;/serial&gt;<br>
        &lt;console type='pty' tty='/dev/pts/9'&gt;<br>
          &lt;source path='/dev/pts/9'/&gt;<br>
          &lt;target type='serial' port='0'/&gt;<br>
          &lt;alias name='serial0'/&gt;<br>
        &lt;/console&gt;<br>
        &lt;channel type='spicevmc'&gt;<br>
          &lt;target type='virtio' name='com.redhat.spice.0'/&gt;<br>
          &lt;alias name='channel0'/&gt;<br>
          &lt;address type='virtio-serial' controller='0' bus='0'
    port='1'/&gt;<br>
        &lt;/channel&gt;<br>
        &lt;input type='tablet' bus='usb'&gt;<br>
          &lt;alias name='input0'/&gt;<br>
        &lt;/input&gt;<br>
        &lt;input type='mouse' bus='ps2'/&gt;<br>
        &lt;graphics type='spice' port='5908' autoport='yes'
    listen='0.0.0.0'&gt;<br>
          &lt;listen type='address' address='0.0.0.0'/&gt;<br>
        &lt;/graphics&gt;<br>
        &lt;sound model='ich6'&gt;<br>
          &lt;alias name='sound0'/&gt;<br>
          &lt;address type='pci' domain='0x0000' bus='0x00' slot='0x04'
    function='0x0'/&gt;<br>
        &lt;/sound&gt;<br>
        &lt;video&gt;<br>
          &lt;model type='qxl' ram='65536' vram='65536' heads='1'/&gt;<br>
          &lt;alias name='video0'/&gt;<br>
          &lt;address type='pci' domain='0x0000' bus='0x00' slot='0x02'
    function='0x0'/&gt;<br>
        &lt;/video&gt;<br>
        &lt;redirdev bus='usb' type='spicevmc'&gt;<br>
          &lt;alias name='redir0'/&gt;<br>
          &lt;address type='usb' bus='0' port='4'/&gt;<br>
        &lt;/redirdev&gt;<br>
        &lt;redirdev bus='usb' type='spicevmc'&gt;<br>
          &lt;alias name='redir1'/&gt;<br>
        &lt;/redirdev&gt;<br>
        &lt;redirfilter&gt;<br>
          &lt;usbdev class='0x08' vendor='0x12BA' product='0x00FF'
    version='2.0' allow='yes'/&gt;<br>
          &lt;usbdev allow='no'/&gt;<br>
        &lt;/redirfilter&gt;<br>
        &lt;memballoon model='virtio'&gt;<br>
          &lt;alias name='balloon0'/&gt;<br>
          &lt;address type='pci' domain='0x0000' bus='0x00' slot='0x07'
    function='0x0'/&gt;<br>
        &lt;/memballoon&gt;<br>
      &lt;/devices&gt;<br>
      &lt;seclabel type='dynamic' model='selinux' relabel='yes'&gt;<br>
       
    &lt;label&gt;unconfined_u:system_r:svirt_t:s0:c824,c991&lt;/label&gt;<br>
       
&lt;imagelabel&gt;unconfined_u:object_r:svirt_image_t:s0:c824,c991&lt;/imagelabel&gt;<br>
      &lt;/seclabel&gt;<br>
    &lt;/domain&gt;<br>
    <br>
  </body>
</html>