Project

General

Profile

Bug #10855

USB pass-through does not work in VirtualBox

Added by Cristian Achim 27 days ago. Updated 3 days ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
2019-04-26
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:

Description

The problems began when I tried to make available to a VirtualBox VM my
USB sticks. At no point did the VitualBox UI show the USB sticks as detected
and mountable in the guest OS. After much fiddling with the USB sticks
inserting and removing them from the USB slots the system had a crash where
the system started writing intensly to the hard drive and the LED of the USB
stick connected at the time showed intense activity. Then the system went off
without a proper shut down, after a black screen. After rebooting I was greeted
with the file named 2019-04-25-09-30-58.048-VBoxSVC-1701.log in the home
folder:

Log created: 2019-04-25T09:30:58.480627000Z
Executable: /opt/VirtualBox/amd64/VBoxSVC
Arg0: /opt/VirtualBox/amd64/VBoxSVC
Arg1: --auto-shutdown
AddRef: illegal refcnt=3221225469 state=2

In subsequent fiddling with the USB sticks I found out that the mounting of USB
sticks from the command line was unavailable and I can't tell if it was ever
available, considering that the desktop system is supposed to automatically
mount USB sticks. Automatic mounting by the system underneath the Mate desktop
environment is mostly broken. Mounting from the Caja user interface works
mabe until before the first unmount command issued from the interface or the
command line. For example in the command line:

branco@openindiana:~$ eject -l
/dev/dsk/c5t0d0p0:1 rmdisk,rmdisk0,NONAME,/media/NONAME
/dev/dsk/c4t3d0s2 cdrom,cdrom0,cd,cd0,sr,sr0
branco@openindiana:~$ eject rmdisk
unmount of rmdisk /dev/dsk/c5t0d0p0:1 failed: Message recipient disconnected from message bus without replying

After the first error I can't recall any instance where moving USB sticks
around the 2 front USB ports I was using have the effect of actually making
the USB stick filesystem available for usage. What happens instead is that
the Places area of the Caja user interface shows 1 or 2 USB sticks as present
and shown with the icon that indicates the USB sticks as ready for physical
removal or for remounting. Those icons stay fixed indifferent of USB stick
removal or insertion. Most times after that the USB stick activity LED even
stays completely off after insertion.

I have found out that by comparison 'rmformat' gives the correct status of
connected USB sticks at all times, even when the activity LED doesn't light up.

Often in the 'dmesg' output there would be the message: 'Command failed to complete...Device is gone'
refering to the USB stick to which I was trying to apply an unmount command.

At no point does 'VboxManage locate hostusb' find USB sticks to be connected.

After alot of fiddling around inserting, removing USB sticks the system
instantly shuts down with a core file present in the home folder after the
crash. I did not find info online about core files in the home folder. Please
advise how to proceed. I have 3 of them.

History

#1

Updated by Michal Nowak 23 days ago

Cristian Achim wrote:

After much fiddling with the USB sticks
inserting and removing them from the USB slots the system had a crash where
the system started writing intensly to the hard drive and the LED of the USB
stick connected at the time showed intense activity. Then the system went off
without a proper shut down, after a black screen. After rebooting I was greeted
with the file named 2019-04-25-09-30-58.048-VBoxSVC-1701.log in the home
folder:

Log created: 2019-04-25T09:30:58.480627000Z
Executable: /opt/VirtualBox/amd64/VBoxSVC
Arg0: /opt/VirtualBox/amd64/VBoxSVC
Arg1: --auto-shutdown
AddRef: illegal refcnt=3221225469 state=2

This sounds like the OS crashed. LEDs being on suggests that core dump was being written.

Refer to this guide if you wan't to gather information about the system crash: https://illumos.org/docs/user-guide/debug-systems/.

In subsequent fiddling with the USB sticks I found out that the mounting of USB
sticks from the command line was unavailable and I can't tell if it was ever
available, considering that the desktop system is supposed to automatically
mount USB sticks. Automatic mounting by the system underneath the Mate desktop
environment is mostly broken. Mounting from the Caja user interface works
mabe until before the first unmount command issued from the interface or the
command line. For example in the command line:

branco@openindiana:~$ eject -l
/dev/dsk/c5t0d0p0:1 rmdisk,rmdisk0,NONAME,/media/NONAME
/dev/dsk/c4t3d0s2 cdrom,cdrom0,cd,cd0,sr,sr0
branco@openindiana:~$ eject rmdisk
unmount of rmdisk /dev/dsk/c5t0d0p0:1 failed: Message recipient disconnected from message bus without replying

There was a problem in DBus/gnome-mount interaction, this should be fixed in gnome/gnome-mount@0.8-2018.0.0.2. Sorry about that.

At no point does 'VboxManage locate hostusb' find USB sticks to be connected.

Is your user in the vboxuser group?

$ groups
staff
$ pfexec usermod -G vboxuser newman

Re-login to your session and re-try VBoxManage list usbhost command, I do see my USB devices.

Though, even with that I was unable to attach USB device to OpenIndiana VM under VirtualBox:

Details:
Failed to create a proxy device for the USB device. (Error: VERR_OPEN_FAILED).
Result Code: 
NS_ERROR_FAILURE (0x80004005)
Component: 
ConsoleWrap
Interface: 
IConsole {872da645-4a9b-1727-bee2-5585105b9eed}

00:00:04.032296 USBLibR3:Function (c0185685) failed. rc=VERR_NOT_FOUND
00:00:04.032324 USBLibR3:USBLibGetClientInfo VBOXUSBMON_IOCTL_CLIENTPATH failed! rc=VERR_NOT_FOUND
00:00:04.032331 USBProxy: Failed to get client info. rc=VERR_NOT_FOUND szDeviceIdent=0x2237:0x4223:272:/pci@0,0/pci17aa,21fa@1a/hub@1/storage
00:00:04.032400 usbProxyConstruct: Failed to open '0x2237:0x4223:272:/pci@0,0/pci17aa,21fa@1a/hub@1/storage', rc=VERR_OPEN_FAILED
00:00:04.032433 ERROR [COM]: aRC=NS_ERROR_FAILURE (0x80004005) aIID={872da645-4a9b-1727-bee2-5585105b9eed} aComponent={ConsoleWrap} aText={Failed to create a proxy device for the USB device. (Error: VERR_OPEN_FAILED)}, preserve=false aResultDetail=-101

Apr 30 08:18:22 lenovo vboxdrv: [ID 702911 kern.notice] vboxdrv: XXXXXXXXXXXXXXXX VMMR0.r0
Apr 30 08:18:22 lenovo vboxdrv: [ID 702911 kern.notice] vboxdrv: XXXXXXXXXXXXXXXX VBoxDDR0.r0
Apr 30 08:18:23 lenovo genunix: [ID 408114 kern.info] /pci@0,0/pci17aa,21fa@1a/hub@1/storage@2/disk@0,0 (sd5) removed
Apr 30 08:18:23 lenovo scsi: [ID 107833 kern.warning] WARNING: /pci@0,0/pci17aa,21fa@1a/hub@1/storage@2/disk@0,0 (sd5):
Apr 30 08:18:23 lenovo  Command failed to complete...Device is gone
Apr 30 08:18:23 lenovo genunix: [ID 408114 kern.info] /pci@0,0/pci17aa,21fa@1a/hub@1/storage@2/disk@0,0 (sd5) removed
Apr 30 08:18:23 lenovo last message repeated 1 time
Apr 30 08:18:23 lenovo genunix: [ID 408114 kern.info] /pci@0,0/pci17aa,21fa@1a/hub@1/storage@2 (scsa2usb3) removed
Apr 30 08:18:23 lenovo vboxusbmon: [ID 695880 kern.notice] Capturing Kobo eReader-4.13.12638 0x2237:0x4223:/pci@0,0/pci17aa,21fa@1a/hub@1/storage Bus=5 Port=2
Apr 30 08:18:23 lenovo vboxusb: [ID 248386 kern.info] usba_ep_data_t is 32 bytes
Apr 30 08:18:23 lenovo vboxusb: [ID 323768 kern.info] usba_ep_data_t::ep_descr @ 0x0 (0)
Apr 30 08:18:23 lenovo vboxusb: [ID 248386 kern.info] usba_ep_data_t is 32 bytes
Apr 30 08:18:23 lenovo vboxusb: [ID 323768 kern.info] usba_ep_data_t::ep_descr @ 0x0 (0)
Apr 30 08:18:23 lenovo vboxusb: [ID 248386 kern.info] usba_ep_data_t is 32 bytes
Apr 30 08:18:23 lenovo vboxusb: [ID 323768 kern.info] usba_ep_data_t::ep_descr @ 0x0 (0)

Let me know if you see something along those lines.

After alot of fiddling around inserting, removing USB sticks the system
instantly shuts down with a core file present in the home folder after the
crash. I did not find info online about core files in the home folder. Please
advise how to proceed. I have 3 of them.

Run mdb core and then commands like $C and ::status, when the core by VirtualBox happens.

#2

Updated by Michal Nowak 3 days ago

  • Subject changed from Mainly USB but also VirtualBox trouble to USB pass-through does not work in VirtualBox
  • Tags deleted (needs-triage)

Also available in: Atom PDF