RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1268290 - Cannot migrate USB camera
Summary: Cannot migrate USB camera
Keywords:
Status: CLOSED DUPLICATE of bug 1268879
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: spice
Version: 7.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Default Assignee for SPICE Bugs
QA Contact: SPICE QE bug list
URL:
Whiteboard:
Depends On: 1268879
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-10-02 12:48 UTC by Andrei Stepanov
Modified: 2016-03-30 09:08 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-03-30 09:08:54 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
remote-viewer log (2.91 MB, text/plain)
2015-10-02 13:37 UTC, Andrei Stepanov
no flags Details

Description Andrei Stepanov 2015-10-02 12:48:22 UTC
USB camera attached at client and forwarded to guest disconnects after migration.

Client prints message:

"USB redirection error: Webcam C170 [046d:082b] at 2-15 rejected by host"

Destination qemu-kvm prints:

"qemu-kvm: usb-redir error: Device no longer matches speed after endpoint info change, disconnecting!"


Guest is RHEL7 with spice-vdagent-0.14.0-9.el7.x86_64
Client is RHEL7 with virt-viewer-2.0.6.el7.x86_64
Server is RHEL7 with:
spice-server-0.12.4-9.el7_1.3.x86_64 + spice-server-0.12.4-9.el7_1.1
qemu-kvm-1.5.3-86.el7_1.6.x86_64
kernel-3.10.0-229.el7.x86_64

Always, 100% reproducible


Steps to Reproduce:
1. run two instances qemu-kvm (src-qemu -> dst-qemu)
2. connect with remote-viewer spice://xx.xx.xx.xx:3000 to running src-qemu
3. Select & pass USB Camera in remote-viewer menu to guest
4. Start migration
5. Wait for migration is fished (`info migrate' in qemu monitor)
6. Try to use camera

Source qemu:
/usr/libexec/qemu-kvm -m 1024 -spice port=$SRCPORT,disable-ticketing,addr=$SRCIPADDR,seamless-migration=on -vga qxl -device virtio-serial -chardev spicevmc,id=vdagent,name=vdagent,debug=0 -device virtserialport,chardev=vdagent,name=com.redhat.spice.0 -chardev spicevmc,name=usbredir,id=usbredirchardev1 -device usb-redir,chardev=usbredirchardev1,id=usbredirdev1,debug=3 -readconfig /etc/qemu-kvm/ich9-ehci-uhci.cfg $GUEST_IMAGE_PATH -monitor stdio -usb

Destination qemu:
/usr/libexec/qemu-kvm -m 1024 -spice port=$DSTPORT,disable-ticketing,addr=$DSTIPADDR,seamless-migration=on -vga qxl -device virtio-serial -chardev spicevmc,id=vdagent,name=vdagent,debug=0 -device virtserialport,chardev=vdagent,name=com.redhat.spice.0 -chardev spicevmc,name=usbredir,id=usbredirchardev1 -device usb-redir,chardev=usbredirchardev1,id=usbredirdev1,debug=3 -readconfig /etc/qemu-kvm/ich9-ehci-uhci.cfg $GUEST_IMAGE_PATH -monitor stdio -incoming tcp:$DSTMIGIPADDR:$DSTMIGPORT -usb

Where:
export SRCPORT=3000
export SRCIPADDR="::"
export DSTPORT="3001"
export DSTIPADDR="::"
export GUEST_IMAGE_PATH="/var/lib/libvirt/images/rhel7.0.qcow2"
export DSTMIGIPADDR="127.0.0.1"
export DSTMIGPORT="55555"


cat /etc/qemu-kvm/ich9-ehci-uhci.cfg 
###########################################################################
#
# You can pass this file directly to qemu using the -readconfig
# command line switch.
#
# This config file creates a EHCI adapter with companion UHCI
# controllers as multifunction device in PCI slot "1d".
#
# Specify "bus=ehci.0" when creating usb devices to hook them up
# there.
#

[device "ehci"]
  driver = "ich9-usb-ehci1"
  addr = "1d.7"
  multifunction = "on"

[device "uhci-1"]
  driver = "ich9-usb-uhci1"
  addr = "1d.0"
  multifunction = "on"
  masterbus = "ehci.0"
  firstport = "0"

[device "uhci-2"]
  driver = "ich9-usb-uhci2"
  addr = "1d.1"
  multifunction = "on"
  masterbus = "ehci.0"
  firstport = "2"

[device "uhci-3"]
  driver = "ich9-usb-uhci3"
  addr = "1d.2"
  multifunction = "on"
  masterbus = "ehci.0"
  firstport = "4"


Commands to activate migration from source qemu to destination qemu:

(qemu) client_migrate_info spice xx.xx.xx.xx 3001
(qemu) migrate -d tcp:127.0.0.1:55555


Interesting thing that I can successfully migrate USB storage stick

Comment 2 Andrei Stepanov 2015-10-02 13:37:33 UTC
Created attachment 1079438 [details]
remote-viewer log

Comment 3 Andrei Stepanov 2015-10-05 15:03:58 UTC
The bug successfully reproduced on RHEL-7.2-Snapshot-4.0:
kernel-3.10.0-320.el7.x86_64
qemu-kvm-1.5.3-104.el7.x86_64
spice-server-0.12.4-15.el7.x86_64

Comment 4 Andrei Stepanov 2015-10-05 15:42:25 UTC
I want bring more light on this bug.

The bug is not about migration. Migration only exposure it.

I found different behavior depending how to pass arguments to qemu-kvm

Variant_1 (reproduces the bug):

 -chardev spicevmc,name=usbredir,id=usbredirchardev1 -device usb-redir,chardev=usbredirchardev1,id=usbredirdev1,debug=3 -readconfig /etc/qemu-kvm/ich9-ehci-uhci.cfg 


Variant_2 (doesn't reproduce bug):

 -readconfig /etc/qemu-kvm/ich9-ehci-uhci.cfg  -chardev spicevmc,name=usbredir,id=usbredirchardev1  -device usb-redir,chardev=usbredirchardev1,id=usbredirdev1,debug=3   


Even more.
With Variant_1 I can _only_ record voice data (arecord -f cd file.wav) using camera's microphone. I cannot capture video with Variant_1.


USB flash stick driver works fine with both: Variant_1 and Variant_2. It can migrate successfully.

Comment 6 Andrei Stepanov 2015-11-10 10:26:21 UTC
I am not sure that rhbz#1268879 fixes this problem.
But, what I am sure of is that, as long as rhbz#1268879 is open this bug cannot be verified.

Comment 8 Andrei Stepanov 2016-03-29 17:11:37 UTC
Host is:

kernel-3.10.0-367.el7.x86_64
qemu-kvm-1.5.3-109.el7.x86_64

I can successfully migrate two different USB cameras.

From:

/usr/libexec/qemu-kvm -m 1024 -spice port=$SRCPORT,disable-ticketing,addr=$SRCIPADDR,seamless-migration=on -vga qxl -device virtio-serial -chardev spicevmc,id=vdagent,name=vdagent,debug=0 -device virtserialport,chardev=vdagent,name=com.redhat.spice.0 -readconfig /etc/qemu-kvm/ich9-ehci-uhci.cfg  -chardev spicevmc,name=usbredir,id=usbredirchardev1  -device usb-redir,chardev=usbredirchardev1,id=usbredirdev1,debug=3   $GUEST_IMAGE_PATH -monitor stdio -usb    -device intel-hda -device hda-duplex

(qemu) client_migrate_info spice spice-bkr02 3001
(qemu) migrate -d tcp:127.0.0.1:55555


To:

/usr/libexec/qemu-kvm -m 1024 -spice port=$DSTPORT,disable-ticketing,addr=$SRCIPADDR,seamless-migration=on -vga qxl -device virtio-serial -chardev spicevmc,id=vdagent,name=vdagent,debug=0 -device virtserialport,chardev=vdagent,name=com.redhat.spice.0 -readconfig /etc/qemu-kvm/ich9-ehci-uhci.cfg  -chardev spicevmc,name=usbredir,id=usbredirchardev1  -device usb-redir,chardev=usbredirchardev1,id=usbredirdev1,debug=3   $GUEST_IMAGE_PATH -monitor stdio -usb    -device intel-hda -device hda-duplex -incoming tcp:$DSTMIGIPADDR:$DSTMIGPORT


Where:

export SRCPORT=3000
export SRCIPADDR="::"
export DSTPORT="3001"
export DSTIPADDR="::"
export GUEST_IMAGE_PATH="/root/rhel71-64_guest.qcow2"
export DSTMIGIPADDR="127.0.0.1"
export DSTMIGPORT="55555"

It works for me.

Comment 9 Victor Toso 2016-03-30 09:08:54 UTC
I considering this bug a consequence of Bug 1268879 and as per Comment 8, this is fixed.

*** This bug has been marked as a duplicate of bug 1268879 ***


Note You need to log in before you can comment on or make changes to this bug.