Page 1 of 1

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

Posted: 19. Aug 2010, 18:59
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.

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

Posted: 22. Aug 2010, 15:47
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.

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

Posted: 22. Aug 2010, 16:15
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.

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

Posted: 22. Aug 2010, 17:22
by Sasquatch
That's described in the manual. It's pretty much self explaining when you open the VM settings.