Bug 1261075

Summary: hostdev_passthrough: VM with attached host USB device failed to run.
Product: Red Hat Enterprise Virtualization Manager Reporter: Nisim Simsolo <nsimsolo>
Component: ovirt-engineAssignee: Martin Polednik <mpoledni>
Status: CLOSED DUPLICATE QA Contact:
Severity: urgent Docs Contact:
Priority: high    
Version: 3.6.0CC: ecohen, gklein, lsurette, mavital, michal.skrivanek, nsimsolo, ofrenkel, rbalakri, Rhev-m-bugs, yeylon
Target Milestone: ---   
Target Release: 3.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: virt
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-09-17 09:08:34 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1248105    
Bug Blocks: 1003572    
Attachments:
Description Flags
engine.log
none
amd host vdsm.log
none
intel vdsm.log none

Description Nisim Simsolo 2015-09-08 14:10:06 UTC
Description of problem:
When attaching host USB device to VM, the VM failed to run.
Issue occurred on AMD and Intel hosts and, RHEL7 and windows 2012 VMs and different USB devices (DOK and Keyboard).
Same VMs run properly when detaching host USB device.

Observing engine.log shows the next ERROR:

2015-09-08 16:41:35,933 ERROR [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (ForkJoinPool-1-worker-5) [] Correlation ID: null, Call 
Stack: null, Custom Event ID: -1, Message: VM rhel7_amd is down with error. Exit message: local variable 'device' referenced before assignment.
2015-09-08 16:41:35,934 INFO  [org.ovirt.engine.core.vdsbroker.VmAnalyzer] (ForkJoinPool-1-worker-5) [] Running on vds during rerun failed vm: '4e47202c-f55a
-47c2-ae8f-2d0567c266b9'

Version-Release number of selected component (if applicable):
rhevm-3.6.0-0.13.master.el6
sanlock-3.2.4-1.el7.x86_64
qemu-kvm-rhev-2.3.0-22.el7.x86_64
vdsm-4.17.5-1.el7ev.noarch
libvirt-client-1.2.17-5.el7.x86_64

How reproducible:
Consistently

Steps to Reproduce:
1. Attach host USB device to VM.
2. Run VM.
3.

Actual results:
VM failed to run and return to "down" state.
Next audit log displayed at webadmin UI: 
VM win2012_intel is down with error. Exit message: local variable 'device' referenced before assignment.

Expected results:
VM should run wuth USB device attached.

Additional info:
engine and vdsm logs attached.
issues time:
AMD host with RHEL7 VM with USB DOK attached: 2015-09-08 16:41:32
Intel host with windows 2012 VM and USB keyboard attached: 2015-09-08 16:48:52

Comment 1 Nisim Simsolo 2015-09-08 14:11:15 UTC
Created attachment 1071376 [details]
engine.log

Comment 2 Nisim Simsolo 2015-09-08 14:15:56 UTC
Created attachment 1071377 [details]
amd host vdsm.log

Comment 3 Nisim Simsolo 2015-09-08 14:17:05 UTC
Created attachment 1071378 [details]
intel vdsm.log

Comment 4 Nisim Simsolo 2015-09-09 12:55:20 UTC
severity changed to urgent: since using GPU attached to VM without using USB mouse and keyboard is almost worthless. unless the user is using keyboard & mouse of an VM console.

Comment 5 Martin Polednik 2015-09-10 12:30:34 UTC
The fix will be included in fix for 1248105 as that is similar issue.

Comment 6 Michal Skrivanek 2015-09-17 09:08:34 UTC
(In reply to Martin Polednik from comment #5)
> The fix will be included in fix for 1248105 as that is similar issue.

this is not a similar issue, this is a _same_ issue

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