[fedora-virt] Some USB devices are blocked by host policy

Richard W.M. Jones rjones at redhat.com
Wed Jan 7 12:45:00 UTC 2015


On Mon, Jan 05, 2015 at 09:08:15PM -0800, Frederick N. Brier wrote:
> 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 <https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Virtualization_Administration_Guide/sect-limit-redirection.html>,
> is that the following XML needs to be configured on the "host
> physical machine's domain XML"

^^ This sentence from the access.redhat.com documentation
seems very confusing ...

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

I've never used this feature either.  However the XML is libvirt XML
and must go into the libvirt guest configuration on the hypervisor.
Use this command to edit it:

  # virsh edit NameOfGuest

The specific XML is documented here:

  https://libvirt.org/formatdomain.html#elementsRedir

There is also an RNG file (ie schema) supplied in the libvirt upstream
sources.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html


More information about the virt mailing list