From owner-freebsd-questions@FreeBSD.ORG Wed Aug 15 17:31:56 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 7A93C16A41A for ; Wed, 15 Aug 2007 17:31:56 +0000 (UTC) (envelope-from nox@saturn.kn-bremen.de) Received: from gwyn.kn-bremen.de (gwyn.kn-bremen.de [212.63.36.242]) by mx1.freebsd.org (Postfix) with ESMTP id 3089F13C46E for ; Wed, 15 Aug 2007 17:31:56 +0000 (UTC) (envelope-from nox@saturn.kn-bremen.de) Received: by gwyn.kn-bremen.de (Postfix, from userid 10) id 382341DEA66; Wed, 15 Aug 2007 19:08:44 +0200 (CEST) Received: from saturn.kn-bremen.de (nox@localhost [127.0.0.1]) by saturn.kn-bremen.de (8.13.8/8.13.6) with ESMTP id l7FH6Odk078912; Wed, 15 Aug 2007 19:06:24 +0200 (CEST) (envelope-from nox@saturn.kn-bremen.de) Received: (from nox@localhost) by saturn.kn-bremen.de (8.13.8/8.13.6/Submit) id l7FH6Nwc078911; Wed, 15 Aug 2007 19:06:23 +0200 (CEST) (envelope-from nox) From: Juergen Lock Date: Wed, 15 Aug 2007 19:06:23 +0200 To: Andriy Gapon Message-ID: <20070815170622.GA78710@saturn.kn-bremen.de> References: <46C2CE10.5090209@icyb.net.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46C2CE10.5090209@icyb.net.ua> User-Agent: Mutt/1.5.16 (2007-06-09) 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: Wed, 15 Aug 2007 17:31:56 -0000 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