Can't pass usb host devices to qemu vms under libvirt

Bug #1722780 reported by Alexandre Pereira Nunes
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libvirt (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

I have quite a few vms and I frequently assign host usb devices to them at runtime by using virt-manager. Last time I tried was maybe a month ago and it went fine as usual.

Now I can no longer do it, and the only hint I have is the following error:

Oct 11 08:49:51 polesbook libvirtd[5592]: erro interno: não foi possível executar o comando QEMU "device_add": failed to find host usb device 2:5

(the portuguese parts translates roughly to "internal error: can't run QEMU command ..."

If I would have to guess, I'd say something related to udev permissions changed on some package.

ProblemType: Bug
DistroRelease: Ubuntu 17.04
Package: libvirt0 2.5.0-3ubuntu5
ProcVersionSignature: Ubuntu 4.10.0-35.39-lowlatency 4.10.17
Uname: Linux 4.10.0-35-lowlatency x86_64
ApportVersion: 2.20.4-0ubuntu4.5
Architecture: amd64
CurrentDesktop: Unity:Unity7
Date: Wed Oct 11 08:55:38 2017
InstallationDate: Installed on 2017-06-14 (118 days ago)
InstallationMedia: Ubuntu 17.04 "Zesty Zapus" - Release amd64 (20170412)
SourcePackage: libvirt
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Alexandre Pereira Nunes (alexandre-nunes) wrote :
Revision history for this message
Alexandre Pereira Nunes (alexandre-nunes) wrote :

On a side note, I attempted to completely remove all of libvirt by apt purge and installing again just in case, but I ended up in the same place.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Hi Alexandre,
there are two known bugs I work on already.
Those are bug 1552241 and 1686324.

You could try if you are affected by any of those - in the bugs are workarounds that you can try.
I recommend:
1. check in dmesg if you see one of the known apparmor denials
2. if you do so check your created guest apparmor profile what was generated for you

The auto-attached kernel/journal logs on this bug do not contain the data so that I could check if for you.

I'd hope that this is a dup to the known issues and that you'll eventually be fixed by what I submitted upstream already. Until then the workarounds should help you to get going - but lets check first if that is true.
So report back once you read through the bugs and tested that on your environment.

Changed in libvirt (Ubuntu):
status: New → Incomplete
Revision history for this message
Alexandre Pereira Nunes (alexandre-nunes) wrote :

I'll check the bugs and see if some workarounds applies. As the lack of apparmor info, I used to boot with audit=0 so maybe there's something to do with it.

On a side note, I upgraded from 17.04 -> 17.10 and as of today the bug is still there.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Hi,
btw the fix in 17.10 for the known issues was released on 2017-11-01 so an update might fix it.

But your case might be different, so take a look and report what I asked for in c#3 so we can discuss.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for libvirt (Ubuntu) because there has been no activity for 60 days.]

Changed in libvirt (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.