device in use error when trying to pass a USB wifi to guest

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
dninja
Posts: 22
Joined: 11. Nov 2008, 17:18

device in use error when trying to pass a USB wifi to guest

Post by dninja »

I've got a Ralink USB wifi card and I want to pass it through to a guest, when I try though I get a failed to attach error and am told the device is in use by someone else.

I've checked in OS X and the interface (en3) is down, I have the client software installed but the GUI part of it definitely isn't running.

How can I find out what is using the device and then how can I free it so I can pass it through?

And in case people suggest it, I don't want to just give the guest networking I want it to see the full native device as I'm going to be running tools that require access to the device not just network access.
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: device in use error when trying to pass a USB wifi to guest

Post by Sasquatch »

The easiest way is to create a filter for the wifi adapter and safely remove it from the Host, then start the VM and plug in the adapter when the VM is fully loaded. That should prevent the Host from grabbing it and let VB send it to the VM instead.
The error you now see, where it is in use, is because the driver (module) is already loaded for the interface to make it work. So even if there is no configuration done on the interface, it's brought to a down state or whatever, it's still in use by the OS itself. VB can't release that, because it requires a higher privilege level than that of user.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
dninja
Posts: 22
Joined: 11. Nov 2008, 17:18

Re: device in use error when trying to pass a USB wifi to guest

Post by dninja »

How so I create a filter? I ended up getting it working by renaming the driver directory in OSX so that it couldn't be loaded but isn't the nicest solution.
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: device in use error when trying to pass a USB wifi to guest

Post by Sasquatch »

That's described in the manual. It's pretty much self explaining when you open the VM settings.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
Post Reply