<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"><https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Virtualization_Administration_Guide/sect-limit-redirection.html></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:
<redirfilter>
<usbdev class='0x08' vendor='0x0951' product='0x1625' version='2.0' allow='yes'/>
<usbdev allow='no'/>
</redirfilter>
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... <gasp> 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 <redirdev> 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>
<domain type='kvm' id='21'><br>
<name>Rain</name><br>
<uuid>bc456b4a-cc10-4be5-b5a5-92e54be74025</uuid><br>
<title>Windows 7 on Cyclone</title><br>
<description>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&apos;s
Architectural Home Design, and Visual Studio.</description><br>
<memory unit='KiB'>4194304</memory><br>
<currentMemory unit='KiB'>4194304</currentMemory><br>
<vcpu placement='static'>2</vcpu><br>
<os><br>
<type arch='x86_64' machine='rhel6.5.0'>hvm</type><br>
<boot dev='hd'/><br>
</os><br>
<features><br>
<acpi/><br>
<apic/><br>
<pae/><br>
</features><br>
<clock offset='localtime'><br>
<timer name='rtc' tickpolicy='catchup'/><br>
<timer name='pit' tickpolicy='delay'/><br>
<timer name='hpet' present='no'/><br>
</clock><br>
<on_poweroff>destroy</on_poweroff><br>
<on_reboot>restart</on_reboot><br>
<on_crash>restart</on_crash><br>
<devices><br>
<emulator>/usr/libexec/qemu-kvm</emulator><br>
<disk type='block' device='disk'><br>
<driver name='qemu' type='raw' cache='none'
io='native'/><br>
<source dev='/dev/vg_data/rain'/><br>
<target dev='vda' bus='virtio'/><br>
<alias name='virtio-disk0'/><br>
<address type='pci' domain='0x0000' bus='0x00' slot='0x08'
function='0x0'/><br>
</disk><br>
<disk type='block' device='disk'><br>
<driver name='qemu' type='raw' cache='none'
io='native'/><br>
<source dev='/dev/vg_data/windata'/><br>
<target dev='vdb' bus='virtio'/><br>
<alias name='virtio-disk1'/><br>
<address type='pci' domain='0x0000' bus='0x00' slot='0x09'
function='0x0'/><br>
</disk><br>
<disk type='block' device='cdrom'><br>
<driver name='qemu' type='raw'/><br>
<source dev='/dev/sr0'/><br>
<target dev='hdc' bus='ide'/><br>
<readonly/><br>
<alias name='ide0-1-0'/><br>
<address type='drive' controller='0' bus='1' target='0'
unit='0'/><br>
</disk><br>
<controller type='usb' index='0' model='ich9-ehci1'><br>
<alias name='usb0'/><br>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05'
function='0x7'/><br>
</controller><br>
<controller type='usb' index='0' model='ich9-uhci1'><br>
<alias name='usb0'/><br>
<master startport='0'/><br>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05'
function='0x0' multifunction='on'/><br>
</controller><br>
<controller type='usb' index='0' model='ich9-uhci2'><br>
<alias name='usb0'/><br>
<master startport='2'/><br>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05'
function='0x1'/><br>
</controller><br>
<controller type='usb' index='0' model='ich9-uhci3'><br>
<alias name='usb0'/><br>
<master startport='4'/><br>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05'
function='0x2'/><br>
</controller><br>
<controller type='scsi' index='0' model='virtio-scsi'><br>
<alias name='scsi0'/><br>
<address type='pci' domain='0x0000' bus='0x00' slot='0x0a'
function='0x0'/><br>
</controller><br>
<controller type='ide' index='0'><br>
<alias name='ide0'/><br>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01'
function='0x1'/><br>
</controller><br>
<controller type='virtio-serial' index='0'><br>
<alias name='virtio-serial0'/><br>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06'
function='0x0'/><br>
</controller><br>
<interface type='bridge'><br>
<mac address='52:54:00:9c:35:fc'/><br>
<source bridge='br0'/><br>
<target dev='vnet8'/><br>
<model type='virtio'/><br>
<alias name='net0'/><br>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03'
function='0x0'/><br>
</interface><br>
<serial type='pty'><br>
<source path='/dev/pts/9'/><br>
<target port='0'/><br>
<alias name='serial0'/><br>
</serial><br>
<console type='pty' tty='/dev/pts/9'><br>
<source path='/dev/pts/9'/><br>
<target type='serial' port='0'/><br>
<alias name='serial0'/><br>
</console><br>
<channel type='spicevmc'><br>
<target type='virtio' name='com.redhat.spice.0'/><br>
<alias name='channel0'/><br>
<address type='virtio-serial' controller='0' bus='0'
port='1'/><br>
</channel><br>
<input type='tablet' bus='usb'><br>
<alias name='input0'/><br>
</input><br>
<input type='mouse' bus='ps2'/><br>
<graphics type='spice' port='5908' autoport='yes'
listen='0.0.0.0'><br>
<listen type='address' address='0.0.0.0'/><br>
</graphics><br>
<sound model='ich6'><br>
<alias name='sound0'/><br>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04'
function='0x0'/><br>
</sound><br>
<video><br>
<model type='qxl' ram='65536' vram='65536' heads='1'/><br>
<alias name='video0'/><br>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02'
function='0x0'/><br>
</video><br>
<redirdev bus='usb' type='spicevmc'><br>
<alias name='redir0'/><br>
<address type='usb' bus='0' port='4'/><br>
</redirdev><br>
<redirdev bus='usb' type='spicevmc'><br>
<alias name='redir1'/><br>
</redirdev><br>
<redirfilter><br>
<usbdev class='0x08' vendor='0x12BA' product='0x00FF'
version='2.0' allow='yes'/><br>
<usbdev allow='no'/><br>
</redirfilter><br>
<memballoon model='virtio'><br>
<alias name='balloon0'/><br>
<address type='pci' domain='0x0000' bus='0x00' slot='0x07'
function='0x0'/><br>
</memballoon><br>
</devices><br>
<seclabel type='dynamic' model='selinux' relabel='yes'><br>
<label>unconfined_u:system_r:svirt_t:s0:c824,c991</label><br>
<imagelabel>unconfined_u:object_r:svirt_image_t:s0:c824,c991</imagelabel><br>
</seclabel><br>
</domain><br>
<br>
</body>
</html>