Comment 30 for bug 787091

Revision history for this message
Serge Hallyn (serge-hallyn) wrote : Re: [Bug 787091] Re: Unable to use USB device in KVM quest

Quoting Royston Carter (<email address hidden>):
> Serge,
> Done as requested but no change. I no longer get my host reporting that it has seen a new printer but the KVM guest still does not see the device. The log file is still showing "operation not permitted" on a regular basis.
>
> Any other thoughts?

This sometimes works, but it can be hard to get it right. We're going to try inserting a wrapper around kvm when executed by libvirt. Please do the following precisely (after re-starting cups and re-installing the packages as described earlier):

 mv /usr/bin/kvm /usr/bin/kvm.real
 vi /usr/bin/kvm

Insert the following:

 #!/bin/sh
 strace -f -o/tmp/strace-kvm.$$.out /usr/bin/kvm.real $*

and make it executable:

 chmod ugo+x /usr/bin/kvm

Then start the virtual machine through libvirt as usual. It'll be slow. When it is shut down, attach /tmp/strace-kvm.*.out to this bug report, and undo the wrapper by doing:

 mv /usr/bin/kvm.real /usr/bin/kvm