From owner-freebsd-questions@freebsd.org Tue Jul 5 00:46:52 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1515FB900E3 for ; Tue, 5 Jul 2016 00:46:52 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx02.qsc.de (mx02.qsc.de [213.148.130.14]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A877022D9 for ; Tue, 5 Jul 2016 00:46:50 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r56.edvax.de (port-92-195-96-167.dynamic.qsc.de [92.195.96.167]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx02.qsc.de (Postfix) with ESMTPS id 93DAE2776B; Tue, 5 Jul 2016 02:46:41 +0200 (CEST) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id u650ke9G005886; Tue, 5 Jul 2016 02:46:40 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Tue, 5 Jul 2016 02:46:40 +0200 From: Polytropon To: Manish Jain Cc: "freebsd-questions@freebsd.org" Subject: Re: How to make smooth USB access available to Virtualbox vm Message-Id: <20160705024640.b2f73f82.freebsd@edvax.de> In-Reply-To: References: Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jul 2016 00:46:52 -0000 On Mon, 4 Jul 2016 23:35:25 +0000, Manish Jain wrote: > Hi, > > I am running VirtualBox under FreeBSD 10.2 amd64. I created a Windows XP > vm for some work I need to do. The vm needs data which I placed on a USB > pen drive. I added a filter under VirtualBox to pass the pen drive to > the vm and then started the vm. The pen drive for some reason is not > smoothly visible to the vm - the icon for removable drive in the vm > keeps coming and going every 1-2 seconds. I think the problem is the > Gnome3 desktop environment and VirtualBox are competing for the USB pen > drive. Yes, that is to be expected as such a configuration tends to do lots of automount "magic" which is now turning against the user. :-) > On the host FreeBSD system, I repeatedly get error messages > "Unable to mount volume" - some error related to HALD. I tried setting > hald_enable="NO" in /etc/rc.conf and then rebooted FreeBSD. If I remember correctly, this doesn't have any effect, especially if you have gnome_enable="YES" defined. > Upon > restart, the situation remains the same - the vm does not see the pen > drive long enough for the data to be copied out. As far as I know, HAL - at the point where it was fully supported - has been EOL'd in Linux and is therefore mostly useless in FreeBSD. The problem you see probably is related to the Gnome 3 removable media subsystem, the "automounter". If you want to exclusively allow USB access to mass storage to the "Windows XP" VirtualBox instance, you need to disable that device inside Gnome, i. e. keep Gnome from trying to access it. Here is an instruction on how to do it (even though it is related to Ubuntu, it should work similarly on FreeBSD/VirtualBox): http://askubuntu.com/questions/25596/how-to-set-up-usb-for-virtualbox Allow me to quote the relevant text section: Select host USB device for access from the guest To grant access to USB devices we need to select a device to disable in the host and to enable in the guest (this is a precaution to avoid simultaneous access from host and guest). This can be done from the panel Devices menu or by right mouse click in the bottom panel of the Virtual Box Manager on the USB icon: (screenshot) Tick the device you need in the guest, untick it if you need it in the host. The selected device will immediately be accessible from the guest. A Windows guest may need additional drivers: (screenshot) Windows 10 may not accept an NTFS formatted USB pen drive. End quote. Also check out the next section in that document which shows how to make certain settings permanent, which probably is more useful for printers and scanners than for removable media, but might be handy if you're going into "USB thumb drive exchange rage" mode. :-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...