USB passthrough to Linux guest not possible

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
OlgaMol
Posts: 5
Joined: 4. May 2023, 14:24

USB passthrough to Linux guest not possible

Post by OlgaMol »

Hi there,

I am using VBox 7.0.10 on a Mac OS X Venture 13.4.1. Guest is a Debian based Linux.
Guest Additions are latest versions and installed on the guest as well

Code: Select all

sudo apt install -y --reinstall virtualbox-guest-x11

Code: Select all

[   10.188940] 08:38:57.423484 main      VBoxClient 7.0.10_Debian r158379 started. Verbose level = 0. Wayland environment detected: no
[   10.189547] 08:38:57.424281 main      Service: VirtualBox host version check
[   10.194072] 08:38:57.428889 main      Service started
[   10.194366] 08:38:57.429165 main      Creating worker thread ...
[   10.194854] 08:38:57.429677 main      Service started
[   10.196014] 08:38:57.430689 main     VBoxClient 7.0.10_Debian r158379 (verbosity: 0) linux.amd64 (Jul 19 2023 15:16:24) release log
               08:38:5
I created USB filters for various devices, however none appears in the guest.

Checking the Mac host I can see that VBox holds the devies:

Code: Select all

VBoxManage list usbhost
Host USB Devices:

UUID:               8ffec83a-c8f6-xxx-9517-cd25a76b5459
VendorId:           0x1050 (1050)
ProductId:          0x0407 (0407)
Revision:           5.67 (0567)
Port:               0
USB version/speed:  0/Full
Manufacturer:       Yubico
Product:            YubiKey OTP+FIDO+CCID
Address:            p=0x0407;v=0x1050;s=0x0000a61739a3;l=0x14300000
Current State:      Held

UUID:               4af9e2a8-74e6-493d-xxx-e3453deceacd
VendorId:           0x0b95 (0B95)
ProductId:          0x772b (772B)
Revision:           0.2 (0002)
Port:               0
USB version/speed:  0/High
Manufacturer:       ASIX Elec. Corp.
Product:            AX88772C
SerialNumber:       0002FD
Address:            p=0x772b;v=0x0b95;s=0x0002ef2cd191;l=0x14200000
Current State:      Held
Checking the Linux guest, nothing is there:

Code: Select all

sudo lsusb   
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 80ee:0021 VirtualBox USB Tablet
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
I rebooted, pluged and unpluged etc. but nothing seems to work. Any idea what this might be?

Any hint is appreciated!

Edit:
It seems to be related to the old problem with mac that VBox is unable to create a proxy device:

Code: Select all

00:00:47.896778 USB: Interface 0x0 on device 'p=0x772b;v=0x0b95;s=0x0000ff069eb11d10;l=0x14200000' is being used by another process. (prot=0x0 class=0xff)
00:00:47.896986 usbProxyConstruct: Failed to open 'p=0x772b;v=0x0b95;s=0x0000ff069eb11d10;l=0x14200000', rc=VERR_SHARING_VIOLATION
00:00:47.897030 ERROR [COM]: aRC=NS_ERROR_FAILURE (0x80004005) aIID={6ac83d89-6ee7-4e33-8ae6-b257b2e81be8} aComponent={ConsoleWrap} aText={Failed to create a proxy device for the USB device. (Error: VERR_SHARING_VIOLATION)}, preserve=false aResultDetail=-114
00:03:19.498654 USB: Interface 0x0 on device 'p=0x772b;v=0x0b95;s=0x0000ff29eaa74693;l=0x14200000' is being used by another process. (prot=0x0 class=0xff)
00:03:19.498883 usbProxyConstruct: Failed to open 'p=0x772b;v=0x0b95;s=0x0000ff29eaa74693;l=0x14200000', rc=VERR_SHARING_VIOLATION
00:03:19.498918 ERROR [COM]: aRC=NS_ERROR_FAILURE (0x80004005) aIID={6ac83d89-6ee7-4e33-8ae6-b257b2e81be8} aComponent={ConsoleWrap} aText={Failed to create a proxy device for the USB device. (Error: VERR_SHARING_VIOLATION)}, preserve=false aResultDetail=-114
00:04:16.202043 USB: Device 'p=0x0407;v=0x1050;s=0x0000ff371cd0fa5d;l=0x14300000' is being used by another process
00:04:16.202297 usbProxyConstruct: Failed to open 'p=0x0407;v=0x1050;s=0x0000ff371cd0fa5d;l=0x14300000', rc=VERR_SHARING_VIOLATION
00:04:16.202365 ERROR [COM]: aRC=NS_ERROR_FAILURE (0x80004005) aIID={6ac83d89-6ee7-4e33-8ae6-b257b2e81be8} aComponent={ConsoleWrap} aText={Failed to create a proxy device for the USB device. (Error: VERR_SHARING_VIOLATION)}, preserve=false aResultDetail=-114
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: USB passthrough to Linux guest not possible

Post by scottgus1 »

I don't see if you are using the Ventura-imposed "sudo Virtualbox" start method, discussed here: viewtopic.php?p=535444#p535444

If you are, then carefully go through USB basics and troubleshooting. If you finish all the steps 1-7 and cannot get your USB device into the guest OS, carefully post the outputs of the commands in step 8 as text, not screenshots. Zip and post the logs step 8 call for, using the forum's Attachments tab.
OlgaMol
Posts: 5
Joined: 4. May 2023, 14:24

Re: USB passthrough to Linux guest not possible

Post by OlgaMol »

Thx. This is actually it. Running it and migrating everything to sudo works.

However I am quite unhappy to run this as sudo. Hopefully there will be a solution somewhen in the future.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: USB passthrough to Linux guest not possible

Post by scottgus1 »

OlgaMol wrote: 29. Aug 2023, 14:28 I am quite unhappy to run this as sudo. Hopefully there will be a solution somewhen in the future.
The devs are unhappy with it too.
OlgaMol
Posts: 5
Joined: 4. May 2023, 14:24

Re: USB passthrough to Linux guest not possible

Post by OlgaMol »

Fingers crossed then.
Thx for your hint and confirming my assumption
OlgaMol
Posts: 5
Joined: 4. May 2023, 14:24

Re: USB passthrough to Linux guest not possible

Post by OlgaMol »

Brief question @scottgus1

Is it possible that running VBox with sudo breaks the clipboard copy & paste, because the host is looking for the sudo clipboard content?
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: USB passthrough to Linux guest not possible

Post by scottgus1 »

I regret that I wouldn't know, I'm no Mac forum guru. The last Mac I had was a Mac Plus back in the 80's 8) so trying it is out for me too...

A Mac guru may come along and weigh in. Are you experiencing this issue with the clipboard? A VM vbox.log may help the knowledgeable person to help better:

Start the VM from full normal shutdown, not save-state. Run until you see the problem happen, then shut down the VM from within the VM's OS if possible. If not possible, close the Virtualbox window for the VM with the Power Off option set.

Right-click the VM in the main Virtualbox window's VM list, choose Show in Explorer/Finder/File Manager. In the "Logs" subfolder, zip the VM's "vbox.log", and post the zip file, using the forum's Attachments tab. (Configure your host OS to show all extensions so you can find the "vbox.log", not "vbox.log.1", etc.)
Post Reply