Red Hat Bugzilla – Bug 1309634
"usb-filter" field of vv-file is ignored
Last modified: 2016-11-03 21:14:29 EDT
Description of problem:
When using a vv-file to connect, usb-filter field is ignored.
remote-viewer should to pass the value to spice-gtk.
Version-Release number of selected component (if applicable):
Happens every time.
Steps to Reproduce:
By checking debug messages:
0. Start a VM with USB enabled.
In this example I'll use disable-ticketing,port=5907 and connect
1. Create a vv-file.
$ cat > /tmp/console.vv << EOF
2. Run remote-viewer and connect to the vm; Look at debug messages.
$ remote-viewer --spice-debug /tmp/console.vv |& grep 'auto-connect filter'
3. Close remote-viewer.
By checking functionality
0. VM is already running
1. Modify the vv-file -- change usb-filter to reject all devices
2. Run remote-viewer
3. With focus on remote-viewer, plug in a usb-disk device and see if
it is being auto-shared with the guest.
debug-messages: only the following messages are seen:
auto-connect filter set to 0x03,-1,-1,-1,0|-1,-1,-1,-1,1
USB disk device is auto-share with the guest.
debug-messages: the following line appears
auto-connect filter set to -1,8888,9999,-1,0
USB disk device is not shared with the guest.
1. Problem exists on upstream git too.
2. remote-viewer --spice-usbredir-auto-redirect-filter=-1,-1,-1,-1,0 spice://localhost:5907 works well
Just for the record, the commit that solves the issue is:
I can reproduce it with virt-viewer-2.0-6.el7.x86_64.
1. Prepare a guest and a ini file and set the "usb-filter=-1,-1,-1,-1,0" to forbid any usb device.
# cat b.ini
2. Run "remote-viewer b.ini" to connect to the guest.
3. Plug a usb device into the host device.
The usb device pops up in the guest.
Then updated to latest virt-viewer-2.0-7.el7.x86_64 and retested it again. The usb device cannot pop up. Set the usb-filter to "usb-filter=-1,-1,-1,-1,1" and replug the usb device, it can pop up successfully.
So it is fixed and move it from ON_QA to VERIFIED.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.