Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Aug 2007 19:06:23 +0200
From:      Juergen Lock <nox@jelal.kn-bremen.de>
To:        Andriy Gapon <avg@icyb.net.ua>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: qemu and usb
Message-ID:  <20070815170622.GA78710@saturn.kn-bremen.de>
In-Reply-To: <46C2CE10.5090209@icyb.net.ua>
References:  <46C2CE10.5090209@icyb.net.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070815170622.GA78710>