Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1552611

Summary: qemu-kvm cannot find USB bus
Product: [oVirt] ovirt-engine Reporter: Michal Skrivanek <michal.skrivanek>
Component: BLL.VirtAssignee: Arik <ahadas>
Status: CLOSED CURRENTRELEASE QA Contact: Nisim Simsolo <nsimsolo>
Severity: high Docs Contact:
Priority: high    
Version: 4.2.2CC: bsanford, bugs, lveyde, michal.skrivanek, mprivozn, nsimsolo, rbalakri, rduda, spower, virt-bugs
Target Milestone: ovirt-4.2.2Keywords: Regression
Target Release: ---Flags: rule-engine: ovirt-4.2+
rule-engine: blocker+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-engine-4.2.2.4 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1552127 Environment:
Last Closed: 2018-03-29 10:58:45 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1552127    
Bug Blocks:    

Description Michal Skrivanek 2018-03-07 12:35:12 UTC
cloning to ovirt for possible workaround on our side

+++ This bug was initially created as a clone of Bug #1552127 +++

Description of problem:
VM with USB support enabled cannot be launched.

Version-Release number of selected component (if applicable):
host (rhel7.5):
vdsm-4.20.20-1.el7ev.x86_64
qemu-kvm-rhev-2.9.0-16.el7_4.14.x86_64
libvirt-client-3.9.0-13.el7.x86_64

engine (rhel7.5)
rhv4.2.2.2-0.1.el7
ovirt-engine-4.2.2.2-0.1.el7.noarch

How reproducible:
always

Steps to Reproduce:
1.create some VM in rhv with usb support enabled
2.run VM
3.

Actual results:
VM is shut down immediatelly after start.
In qemu log appears error:
2018-03-06T14:32:36.783360Z qemu-kvm: -device ich9-usb-uhci2,masterbus=ua-b17203da-8498-48ae-9b4e-71e6757fcd68.0,firstport=2,bus=pci.0,addr=0x7.0x1: USB bus 'ua-b17203da-8498-48ae-9b4e-71e6757fcd68.0' not found

Expected results:
VM is running

Additional info:
It worked ok before vdsm and ovirt-engine update

--- Additional comment from Radek Duda on 2018-03-06 15:45 CET ---



--- Additional comment from Michal Skrivanek on 2018-03-07 07:16:24 CET ---

Seems the USB companion controller's masterbus is not generated correctly? Why does it use alias.0?

--- Additional comment from Michal Privoznik on 2018-03-07 08:21:15 CET ---

Yes, this is a libvirt bug. I recall posting some patches for this on the upstream but don't recall their fate right now. Anwyay, I'll look into this.

For QE or anybody else willing to reproduce this: Just try to start domain with the following USB controller:

    <controller type='usb' index='0' model='ich9-uhci2'>
      <alias name='ua-ble'/>
      <master startport='2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x1'/>
    </controller>

--- Additional comment from Red Hat Bugzilla Rules Engine on 2018-03-07 08:21:23 CET ---

Since this bug report was entered in Red Hat Bugzilla, the release flag has been set to ? to ensure that it is properly evaluated for this release.

--- Additional comment from Michal Privoznik on 2018-03-07 09:50:07 CET ---

Just for housekeeping sake: what is the reason you need to set user alias for this device (which can't be hotplugged anyway)? Because I'm thinking about a fix where I forbid it.

--- Additional comment from Radek Duda on 2018-03-07 11:33:35 CET ---

I do not know. This is the default behaviour of rhv4.2

--- Additional comment from Michal Skrivanek on 2018-03-07 12:26:59 CET ---

(In reply to Michal Privoznik from comment #5)
> Just for housekeeping sake: what is the reason you need to set user alias
> for this device (which can't be hotplugged anyway)? Because I'm thinking
> about a fix where I forbid it.

it's a generic code for all devices. why forbid? it's not particularly interesting and we can likely easily disable that for usb controllers, but why creating inconsistency in libvirt?

Comment 2 Nisim Simsolo 2018-03-21 09:35:58 UTC
Verification version:
rhvm-4.2.2.4-0.1.el7
vdsm-4.20.22-1.el7ev.x86_64
qemu-kvm-rhev-2.9.0-16.el7_4.15.x86_64
libvirt-client-3.9.0-14.el7.x86_64
spice-server-0.14.0-2.el7.x86_64

Verification scenario:
1. Edit VM -> console -> enable USB support.
2. Run VM. 
3. Verify VM is running.
4. From virt-viewer client click file -> USB device selection,
select DOK and USB mouse
5. Verify USB mouse is working and DOK is accessible.
6. Remove & add devices again and verify devices functionality.
7. Power off VM.
8. Repeat steps 2-6 again.

Comment 3 Sandro Bonazzola 2018-03-29 10:58:45 UTC
This bugzilla is included in oVirt 4.2.2 release, published on March 28th 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.2.2 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.