[libvirt] Unable to start a VM with USB device

Hi, I just packaged libvirt 0.7.7 for Debian. But I can't start a VM with an USB device attached: # virsh start test-vm error: Failed to start domain test-vm error: unable to set security context '107:113' on '/dev/bus/usb/000/000': No such file or directory I know there were changes about USB passthrough so I suppose it's a bug. Thank you, -- Laurent Léonard

On 03/05/2010 12:33 PM, Laurent Léonard wrote:
Hi,
I just packaged libvirt 0.7.7 for Debian.
But I can't start a VM with an USB device attached: # virsh start test-vm error: Failed to start domain test-vm error: unable to set security context '107:113' on '/dev/bus/usb/000/000': No such file or directory
I know there were changes about USB passthrough so I suppose it's a bug.
Thank you,
Can you provide the VM XML? Thanks, Cole

On Fri, Mar 05, 2010 at 01:31:15PM -0500, Cole Robinson wrote:
On 03/05/2010 12:33 PM, Laurent Léonard wrote:
Hi,
I just packaged libvirt 0.7.7 for Debian.
But I can't start a VM with an USB device attached: # virsh start test-vm error: Failed to start domain test-vm error: unable to set security context '107:113' on '/dev/bus/usb/000/000': No such file or directory
I know there were changes about USB passthrough so I suppose it's a bug.
Thank you,
Can you provide the VM XML?
No need, I screwed up. On domain startup, the security driver code is running before my code which resolves product/vendor to bus/device. I missed this because my test machine had the security drivers disabled. Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

Le vendredi 05 mars 2010 à 20:25, Daniel P. Berrange a écrit :
On Fri, Mar 05, 2010 at 01:31:15PM -0500, Cole Robinson wrote:
On 03/05/2010 12:33 PM, Laurent Léonard wrote:
Hi,
I just packaged libvirt 0.7.7 for Debian.
But I can't start a VM with an USB device attached: # virsh start test-vm error: Failed to start domain test-vm error: unable to set security context '107:113' on '/dev/bus/usb/000/000': No such file or directory
I know there were changes about USB passthrough so I suppose it's a bug.
Thank you,
Can you provide the VM XML?
No need, I screwed up. On domain startup, the security driver code is running before my code which resolves product/vendor to bus/device. I missed this because my test machine had the security drivers disabled.
How can I disable the security drivers for my virtual machine ? Could you send a patch to fix that issue ? Thank you, -- Laurent Léonard

On 03/06/2010 05:26 PM, Laurent Léonard wrote:
Le vendredi 05 mars 2010 à 20:25, Daniel P. Berrange a écrit :
On Fri, Mar 05, 2010 at 01:31:15PM -0500, Cole Robinson wrote:
On 03/05/2010 12:33 PM, Laurent Léonard wrote:
Hi,
I just packaged libvirt 0.7.7 for Debian.
But I can't start a VM with an USB device attached: # virsh start test-vm error: Failed to start domain test-vm error: unable to set security context '107:113' on '/dev/bus/usb/000/000': No such file or directory
I know there were changes about USB passthrough so I suppose it's a bug.
Thank you,
Can you provide the VM XML?
No need, I screwed up. On domain startup, the security driver code is running before my code which resolves product/vendor to bus/device. I missed this because my test machine had the security drivers disabled.
How can I disable the security drivers for my virtual machine ?
Set security_driver='none' and user/group to 'root' in /etc/libvirt/qemu.conf Could you send
a patch to fix that issue ?
Dan is offline this week, I'll take a stab at fixing this. - Cole
participants (3)
-
Cole Robinson
-
Daniel P. Berrange
-
Laurent Léonard