From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gerd Hoffmann Subject: Re: Constantly changing USB product ID Date: Wed, 28 Mar 2012 16:27:46 +0200 Message-ID: <4F731FE2.1060207@redhat.com> References: <20120327174835.1167690z7ttpckw8@bitis.umrk.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Jaap Winius Return-path: Received: from mx1.redhat.com ([209.132.183.28]:44150 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751513Ab2C1O1v (ORCPT ); Wed, 28 Mar 2012 10:27:51 -0400 In-Reply-To: <20120327174835.1167690z7ttpckw8@bitis.umrk.nl> Sender: kvm-owner@vger.kernel.org List-ID: On 03/27/12 17:48, Jaap Winius wrote: > Hi folks, > > Recently I learned how to configure KVM with USB pass-though > functionality. In my case I configured my guest domain with this block > of code: > > > > > >
> > > > At first this worked fine, but then later the guest domain refused to > start because the USB device was absent. Not sure what libvirt does there, but qemu can handle this just fine. If you add '-device usb-host,vendorid=0x0c93,productid=0x1772' qemu will start just fine no matter if the device is present or not. You can plug in in and out as you like and it will show up in the guest when plugged in. Might be a some security thing, when running qemu depriviledged and selinux-controlled libvirt probably has to make sure the files in /dev/bus/usb/ have correct permissions and labels. > When I checked, I found that > its product ID had mysteriously changed to 1771. Later it was back at > 1772. Now it appears that the USB device I am dealing with has a product > ID that changes back and forth between 1771 and 1772 at random. Guess it has two modes, one "real" and one "install" where it presents itself as mass storage device with windows drivers. > Apparently, the Windows program running on the guest domain is designed > to deal with this nonsense, but the question is, Can KVM be configured > to deal with it? Something like would be useful, > but that doesn't work. qemu is fine with '-device usb-host,vendorid=0x0c93' which will match any product with from that vendor. Dunno about the libvirt side. cheers, Gerd