Direct access to USB port?

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
Cubytus32
Posts: 44
Joined: 28. Aug 2013, 03:41

Direct access to USB port?

Post by Cubytus32 »

Hello there,

I wondered if there was a way for VirtualBox to provide the guests inside direct access to a host's USB port? The reason is, some external devices may be supported by a guest, but not an host. Currently, if they are not recognized by the host, then they can't be linked to the guest, because the host keeps on trying to access them. Is there any way around this?
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Direct access to USB port?

Post by mpack »

Cubytus32 wrote:Currently, if they are not recognized by the host, then they can't be linked to the guest, because the host keeps on trying to access them.
That isn't true. All USB devices consist of a USB portion and an application specific portion. The USB portion doesn't need drivers or recognition from the host OS, it just needs the host OS to support USB. Hence all USB devices can be mounted in the host, but their applications won't work if the drivers are missing.

You can connect all USB devices to the guest if the host can mount them - just add a filter which matches the device. If the guest OS has an application driver for that device then the device will work there, even if the host OS has no similar driver.

Note that VirtualBox does not currently support USB 3.0 devices.

Google for "USB site:forums.virtualbox.org" for a near infinite number of previous answers to USB questions. Internal search doesn't index three letter words.
Cubytus32
Posts: 44
Joined: 28. Aug 2013, 03:41

Re: Direct access to USB port?

Post by Cubytus32 »

Well, I may have misformulated it, but there's a definitive problem with USB.

Here, it shows my attempt to connect an Epson Perfection 610 scanner to a Ubuntu virtual machine. This scanner is recognized by the host AND Ubuntu running on a hardware machine. No such luck in a VirtualBox setting.
Capture d’écran 2013-08-28 à 11.14.18.png
Capture d’écran 2013-08-28 à 11.14.18.png (105.56 KiB) Viewed 13940 times
Then crashes something inside VirtualBox, rendering it unable to save machine state.
Capture d’écran 2013-08-28 à 11.15.21.png
Capture d’écran 2013-08-28 à 11.15.21.png (60.62 KiB) Viewed 13940 times

(Sorry the forum doesn't let me post direct pictures decently! States that I must have more than 1 day and 1 post, while I have two, and (re)registered for three.)
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Direct access to USB port?

Post by mpack »

Post a VM log file for a session which has the "Save state" problem. After the session in question has ended right click the VM in the GUI and select "Show Log". Zip up the log before attaching it here.

ps. New members can easily attach images and zip files here (see "Upload attachment" tab when creating or editing a message). The only thing they can't do is post URLs, which the forum interprets as a spamming attempt. I usually won't click on offsite links anyway, so best just to attach directly.
Cubytus32
Posts: 44
Joined: 28. Aug 2013, 03:41

Re: Direct access to USB port?

Post by Cubytus32 »

There were not links, but externally-hosted images. The forum doesn't even let me login with Safari.

Well, apparently when I try to attach the scanner to the guest, it crashes so hard that log files can't be retrieved. If I open them before attaching the scanner I can see the logs being updated with some weird timestamp. Seems to be related to the virtual machine start. If I hit Refresh just after attaching the scanner, I get:

Code: Select all

No logs files found. Press the Refresh button to rescan the log folder.
Can't know what is going wrong.
ChipMcK
Volunteer
Posts: 1095
Joined: 20. May 2009, 02:17
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, OSX
Location: U S of A

Re: Direct access to USB port?

Post by ChipMcK »

I would suspect that VBoxSVC process just disappears.

Check in Activity Monitor (/Applications/Utilities) that the process is running after the crash

refer to viewtopic.php?f=8&t=52143
Cubytus32
Posts: 44
Joined: 28. Aug 2013, 03:41

Re: Direct access to USB port?

Post by Cubytus32 »

Well, as I tried to reproduce the bug again, I was greeted by another message:

Code: Select all

USB device 'EPSON Perfection610' with UUID {ff437c32-cdde-4923-8f5c-0e695cb458f8} is busy with a previous request. Please try again later.

Code: Select all

Result Code: 
NS_ERROR_INVALID_ARG (0x80070057)
Component: 
HostUSBDevice
Interface: 
IHostUSBDevice {173b4b44-d268-4334-a00d-b6521c9a740a}
Callee: 
IConsole {db7ab4ca-2a3f-4183-9243-c1208da92392}
VBoxSVC didn't seem to crash that time, although I can't confirm that it did before.
ChipMcK
Volunteer
Posts: 1095
Joined: 20. May 2009, 02:17
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, OSX
Location: U S of A

Re: Direct access to USB port?

Post by ChipMcK »

Cubytus32 wrote:Well, as I tried to reproduce the bug again, I was greeted by another message:

Code: Select all

USB device 'EPSON Perfection610' with UUID {ff437c32-cdde-4923-8f5c-0e695cb458f8} is busy with a previous request. Please try again later.

Code: Select all

[/quote]
Did you notice the 'workaround' in https://forums.virtualbox.org/viewtopic.php?f=8&t=52143 dated 14 Dec 2012
Cubytus32
Posts: 44
Joined: 28. Aug 2013, 03:41

Re: Direct access to USB port?

Post by Cubytus32 »

As I wrote,
VBoxSVC didn't seem to crash that time, although I can't confirm that it did before.
and this workaround doesn't help with the error I get.
ChipMcK
Volunteer
Posts: 1095
Joined: 20. May 2009, 02:17
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, OSX
Location: U S of A

Re: Direct access to USB port?

Post by ChipMcK »

That is not the 'workaround' listed at the post dated 14 Dec 2012 viewtopic.php?f=8&t=52143
Cubytus32
Posts: 44
Joined: 28. Aug 2013, 03:41

Re: Direct access to USB port?

Post by Cubytus32 »

It is. Illustrated, and doesn't make any difference.
Capture d’écran 2013-09-01 à 11.45.29.png
Capture d’écran 2013-09-01 à 11.45.29.png (46.13 KiB) Viewed 13849 times
Capture d’écran 2013-09-01 à 11.46.26.png
Capture d’écran 2013-09-01 à 11.46.26.png (34.94 KiB) Viewed 13849 times
Gives the error message stated above.
Peebee
Posts: 24
Joined: 14. Jan 2013, 05:51

Re: Direct access to USB port?

Post by Peebee »

Have you tried to add a generic filter by clicking on the blue usb icon to create a "new filter 1"?

That's my go to solution maybe it's not appropriate here.
Cubytus32
Posts: 44
Joined: 28. Aug 2013, 03:41

Re: Direct access to USB port?

Post by Cubytus32 »

Hmm, and how would I fill the fields? Just copying, by hand, the parameters from the automatically created filter that fails?
Post Reply