From owner-freebsd-questions@FreeBSD.ORG Thu Aug 16 11:31:40 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE08F16A41B for ; Thu, 16 Aug 2007 11:31:40 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from gateway.cybervisiontech.com.ua (gateway.cybervisiontech.com.ua [88.81.251.18]) by mx1.freebsd.org (Postfix) with ESMTP id 908E613C457 for ; Thu, 16 Aug 2007 11:31:40 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from localhost (hq.cybervisiontech.com [127.0.0.1]) by gateway.cybervisiontech.com.ua (Postfix) with ESMTP id 699BFED5404; Thu, 16 Aug 2007 14:31:38 +0300 (EEST) X-Virus-Scanned: amavisd-new at cybervisiontech.com Received: from gateway.cybervisiontech.com.ua ([127.0.0.1]) by localhost (hq.cybervisiontech.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Gw7QgHjYNyMn; Thu, 16 Aug 2007 14:31:37 +0300 (EEST) Received: from [10.2.1.87] (rein.cybervisiontech.com.ua [10.2.1.87]) by gateway.cybervisiontech.com.ua (Postfix) with ESMTP id 0A58CED4A2E; Thu, 16 Aug 2007 14:31:37 +0300 (EEST) Message-ID: <46C43598.2040000@icyb.net.ua> Date: Thu, 16 Aug 2007 14:31:36 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.6 (X11/20070803) MIME-Version: 1.0 To: Juergen Lock References: <46C2CE10.5090209@icyb.net.ua> <20070815170622.GA78710@saturn.kn-bremen.de> In-Reply-To: <20070815170622.GA78710@saturn.kn-bremen.de> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: qemu and usb X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Aug 2007 11:31:41 -0000 on 15/08/2007 20:06 Juergen Lock said the following: > On Wed, Aug 15, 2007 at 12:57:36PM +0300, Andriy Gapon wrote: >> Is it possible on FreeBSD to provide access to host USB devices for qemu >> guests ? >> >> I tried playing with -usb and -usbdevice and to follow some linux >> how-to's but with no luck. > > Does the following snippet from the ports' pkg-message help? > > [...] > - if you want to use usb devices connected to the host in the guest > (usb_add host:... monitor command) you need to make sure the host isn't > claiming them, e.g. for umass devices (like memory sticks or external > harddrives) make sure umass isn't in the kernel (you can then still load it > as a kld when needed), also unless you are running qemu as root you then > need to fix permissions for /dev/ugen* device nodes: if you are on 5.x or > later (devfs) put a rule in /etc/devfs.rules, activate it in /etc/rc.conf > and run /etc/rc.d/devfs restart. example devfs.rules: > [ugen_ruleset=20] > add path 'ugen*' mode 660 group operator > corresponding rc.conf line: > devfs_system_ruleset="ugen_ruleset" > - still usb: since the hub is no longer attached to the uchi controller > and the wakeup mechanism, resume interrupt is not implemented yet linux > guests will suspend the bus, i.e. they wont see devices usb_add'ed after > its (linux') uhci module got loaded. workaround: either add devices > before linux loads the module or rmmod and modprobe it afterwards. > [...] > > With this I was able to mount an usb cardreader from the guest. > (although that is pretty slow...) Juergen, thank you very much! While I unloaded umass I totally forgot to load ugen. -- Andriy Gapon