[Bug 1174406] New: Virtual Box USB passthrough
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406 Bug ID: 1174406 Summary: Virtual Box USB passthrough Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Virtualization:Other Assignee: virt-bugs@suse.de Reporter: johannes@kehrer.cc QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- Created attachment 839923 --> http://bugzilla.opensuse.org/attachment.cgi?id=839923&action=edit Virtualbox LOG file since the last update of Virtualbox the USB passthrough doesn't work anymore. The ~/.config/VirtualBox/VBoxSVC.log sais: "00:00:01.695707 nspr-5 WARNING [COM]: aRC=NS_ERROR_FAILURE (0x80004005) aIID={16ced992-5fdc-4aba-aff5-6a39bbd7c38b} aComponent={HostWrap} aText={VirtualBox is not currently allowed to access USB devices. You can change this by adding your user to the 'vboxusers' group. Please see the user manual for a more detailed explanation}, preserve=true aResultDetail=0" However, I am member of the group 'vboxusers': "Johannes@JohannesOffice:~> id uid=1000(johannes) gid=100(users) Gruppen=100(users),457(vboxusers),486(kvm)" My Configuration: openSUSE Tumbleweed 20200717 KDE-Plasma-Version: 5.19.3 KDE-Frameworks-Version: 5.72.0 Qt-Version: 5.15.0 Kernel-Version: 5.7.7-1-default Art des Betriebssystems: 64-bit Prozessoren: 4 × AMD Ryzen 3 2200G with Radeon Vega Graphics Speicher: 13,6 GiB Arbeitsspeicher Grafikprozessor: AMD RAVEN -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406
Johannes Kehrer
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406#c10
Robin Klitscher
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406#c11
--- Comment #11 from Larry Finger
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406#c12
--- Comment #12 from Johannes Kehrer
I created a new 15.2 instance with VB 6.1.10. USB passthru worked. I updated it to 6.1.12 using my local repo, and it still worked.
In your log, I noted 00:00:00.000692 main Executable: /usr/lib/virtualbox/VBoxSVC
On my system, the executable is /usr/lib/virtualbox/VirtualBoxVM
VBoxSVC starts the XPCOM server. How are you starting your VM? Are you specifying the USB device in the USB Device Filters section of the GUI, or from the Devices Tab of the VM?
Hi, I start VirtualBox from the GUI "Virtual Box". Before I was starting it from the Device Tab. But now now devices are listed anymore.... :-( Also, when I try to use the USB Device Filter section of the GUI, it only tells mie: "No Devices available".... :-( Maybe I have to install the machine from scratch... -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406#c13
--- Comment #13 from Johannes Kehrer
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406#c14
Larry Finger
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406#c15
--- Comment #15 from Larry Finger
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406#c16
--- Comment #16 from Robin Klitscher
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406#c17
--- Comment #17 from Johannes Kehrer
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406#c18
--- Comment #18 from Larry Finger
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406#c19
--- Comment #19 from Johannes Kehrer
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406#c20
--- Comment #20 from Johannes Kehrer
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406#c21
--- Comment #21 from Johannes Kehrer
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406#c22
--- Comment #22 from Larry Finger
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406#c23
--- Comment #23 from Johannes Kehrer
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406#c24
--- Comment #24 from Larry Finger
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406#c25
--- Comment #25 from Robin Klitscher
Thanks. As expected, the logs show a permissions problem. Finding why that happens in the code gets a bit more complicated.
Where did the VBoxSVC.log come from? I could not find that on my machine.
What is the output of 'VBoxManage list usbhost'? If that shows nothing, then run 'strace VBoxManage list usbhost >> host_list.txt 2>&1' and post host_list.txt.
As mentioned in my OP, in Leap 15.2 the command “VBoxManage list usbhost” also returns <none> when invoked as a user. But when it’s invoked as root, it returns a long list of USB devices. Circumstantially, this seemed to hint at a permissions problem. Beyond that, when I first installed Leap 15.2 about a month ago (fresh install, not an upgrade), I had a problem with the vboxusers group. Briefly, the VirtualBox installation, the command <groups> in a terminal and the YaST GUI all thought the vboxusers group was missing. Inconsistently, however, the command <groupadd> in a terminal and the content of the file /etc/groups thought it already existed. I posted this to the opensuse@opensuse.org list, and David Rankin suggested that I might try gpasswd -a robin vboxusers. I did, and it worked. I don’t know enough to know if this might be related to the USB difficulty in VirtualBox, but I wondered if it might be relevant in some way? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406#c26
--- Comment #26 from Larry Finger
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406#c27
--- Comment #27 from Robin Klitscher
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406#c28
--- Comment #28 from Larry Finger
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406#c29
--- Comment #29 from Johannes Kehrer
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406#c30
--- Comment #30 from Larry Finger
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406#c31
--- Comment #31 from Robin Klitscher
From other stuff you have posted, I think that you have "easy" selected. It is
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406#c32
--- Comment #32 from Larry Finger
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406#c33
--- Comment #33 from Robin Klitscher
One additional test: Does 'grep PERMISSION_SECURITY /etc/sysconfig/security' show PERMISSION_SECURITY="easy local"
From other stuff you have posted, I think that you have "easy" selected. It is the default.
Finally, have you rebooted since this problem first showed up?
Yes to the first ("easy local" confirmed) Yes to the second. Frequently. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406#c34
--- Comment #34 from Larry Finger
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406#c35
--- Comment #35 from Larry Finger
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406#c36
--- Comment #36 from Johannes Kehrer
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406#c37
--- Comment #37 from Johannes Kehrer
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406#c38
--- Comment #38 from Johannes Kehrer
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406#c39
--- Comment #39 from Larry Finger
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406#c40
--- Comment #40 from Larry Finger
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406#c41
--- Comment #41 from Robin Klitscher
have been trying to understand what changes with that script. There are essentially two differences:
1. It sets the 4th argument of VBoxCreateUSBNode.sh to the numerical value of vboxusers. If that argument is blank, it sets the group to "vboxusers". That should not make a difference.
2. It changes the location of the VB udev rules to be in /etc/udev/rules.d/ instead of in /usr/lib/udev/rules.d/. If this is the critical change, then there is a bug someplace in openSUSE.
The 2nd version of the script removes the change in #1. If using this script still helps, then #2 is the problem.
Thanks for testing.
I regret to have to report that neither of the two scripts improves things here. But thank you anyway, Larry, for the effort you've put into dealing with what seems to be a tiny minority problem - and possibly even self-inflicted. I'm very grateful. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406#c42
--- Comment #42 from Larry Finger
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406#c43
--- Comment #43 from Johannes Kehrer
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406#c44
--- Comment #44 from Johannes Kehrer
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406#c45
--- Comment #45 from Johannes Kehrer
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406#c46
--- Comment #46 from Larry Finger
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406#c47
--- Comment #47 from Robin Klitscher
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406#c48
--- Comment #48 from Robin Klitscher
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406#c49
Andreas Schneider
/usr/lib/virtualbox/VBoxHeadless
Effective UID is not root (euid=%d egid=%d uid=%d gid=%d)
/usr/lib/virtualbox/VBoxNetDHCP
Effective UID is not root (euid=%d egid=%d uid=%d gid=%d)
/usr/lib/virtualbox/VBoxNetNAT
Effective UID is not root (euid=%d egid=%d uid=%d gid=%d)
/usr/lib/virtualbox/VBoxSDL
Effective UID is not root (euid=%d egid=%d uid=%d gid=%d)
/usr/lib/virtualbox/VirtualBoxVM
asn $> ll /usr/lib/virtualbox/VBoxHeadless -rwsr-x--- 1 root vboxusers 166536 Aug 29 04:21 /usr/lib/virtualbox/VBoxHeadless asn $> ll /usr/lib/virtualbox/VBoxNetDHCP -rwsr-x--- 1 root vboxusers 166528 Aug 29 04:21 /usr/lib/virtualbox/VBoxNetDHCP asn $> ll /usr/lib/virtualbox/VBoxNetNAT -rwsr-x--- 1 root vboxusers 166528 Aug 29 04:21 /usr/lib/virtualbox/VBoxNetNAT asn $> ll /usr/lib/virtualbox/VBoxSDL -rwsr-x--- 1 root vboxusers 166528 Aug 29 04:21 /usr/lib/virtualbox/VBoxSDL asn $> ll /usr/lib/virtualbox/VirtualBoxVM -rwsr-x--- 1 root vboxusers 166536 Aug 29 04:21 /usr/lib/virtualbox/VirtualBoxVM The strange thing is, those binaries all have the suid bit set. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406#c50
--- Comment #50 from Larry Finger
I'm running into the same issue on tumbleweed.
It doesn't seem to be an issue with the usb permissions as I can access it:
$ find /dev/vboxusb/ -ls 24884 0 drwxr-x--- 5 root vboxusers 100 Sep 2 07:42 /dev/vboxusb/ 67434 0 drwxr-x--- 2 root vboxusers 40 Sep 2 07:54 /dev/vboxusb/004 5423 0 drwxr-x--- 2 root vboxusers 80 Sep 2 07:36 /dev/vboxusb/001 30883 0 crw-rw---- 1 root vboxusers 189, 1 Sep 2 07:36 /dev/vboxusb/001/002 5428 0 crw-rw---- 1 root vboxusers 189, 2 Sep 2 07:36 /dev/vboxusb/001/003 35736 0 drwxr-x--- 2 root vboxusers 120 Sep 2 07:36 /dev/vboxusb/003 39943 0 crw-rw---- 1 root vboxusers 189, 261 Sep 2 07:36 /dev/vboxusb/003/006 32041 0 crw-rw---- 1 root vboxusers 189, 260 Sep 2 07:36 /dev/vboxusb/003/005 2387 0 crw-rw---- 1 root vboxusers 189, 259 Sep 2 07:36 /dev/vboxusb/003/004 1468 0 crw-rw---- 1 root vboxusers 189, 258 Sep 2 07:36 /dev/vboxusb/003/003
$ cat /dev/vboxusb/001/002 m+$ T1 !"; !" !"b
As I get output form the device, I obviously must have access via vboxusers group as a user.
I tried to get more log output, but didn't really work using:
export VBOX_RELEASE_LOG="rem*.e.l.f main gui" export VBOX_RELEASE_LOG_FLAGS="buffered thread msprog" mkdir /tmp/vbox export VBOXSVC_RELEASE_LOG_DEST='dir=/tmp/vbox'
then starting the service manually:
/usr/lib/virtualbox/VBoxSVC
Then I tried to strace it. The strange thing is that printed on the commandline:
<html><b>Effective UID is not root (euid=1000 egid=100 uid=1000 gid=100) (rc=-10)</b><br/><br/>Please try reinstalling VirtualBox.<br><br><!--EOM-->where: SUPR3HardenedMain what: 2 VERR_PERMISSION_DENIED (-10) - Permission denied. </html>
asn $> bgrep "Effective UID" /usr/lib/virtualbox/ Effective UID is not root (euid=%d egid=%d uid=%d gid=%d)
> /usr/lib/virtualbox/VBoxHeadless
Effective UID is not root (euid=%d egid=%d uid=%d gid=%d)
> /usr/lib/virtualbox/VBoxNetDHCP
Effective UID is not root (euid=%d egid=%d uid=%d gid=%d)
> /usr/lib/virtualbox/VBoxNetNAT
Effective UID is not root (euid=%d egid=%d uid=%d gid=%d)
> /usr/lib/virtualbox/VBoxSDL
Effective UID is not root (euid=%d egid=%d uid=%d gid=%d)
> /usr/lib/virtualbox/VirtualBoxVM
asn $> ll /usr/lib/virtualbox/VBoxHeadless -rwsr-x--- 1 root vboxusers 166536 Aug 29 04:21 /usr/lib/virtualbox/VBoxHeadless asn $> ll /usr/lib/virtualbox/VBoxNetDHCP -rwsr-x--- 1 root vboxusers 166528 Aug 29 04:21 /usr/lib/virtualbox/VBoxNetDHCP asn $> ll /usr/lib/virtualbox/VBoxNetNAT -rwsr-x--- 1 root vboxusers 166528 Aug 29 04:21 /usr/lib/virtualbox/VBoxNetNAT asn $> ll /usr/lib/virtualbox/VBoxSDL -rwsr-x--- 1 root vboxusers 166528 Aug 29 04:21 /usr/lib/virtualbox/VBoxSDL asn $> ll /usr/lib/virtualbox/VirtualBoxVM -rwsr-x--- 1 root vboxusers 166536 Aug 29 04:21 /usr/lib/virtualbox/VirtualBoxVM
The strange thing is, those binaries all have the suid bit set.
What happens if you create a new user belonging to vboxusers? Can that account run VBox? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1174406
Jürgen Fuhrmann
participants (1)
-
bugzilla_noreply@suse.com