Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 601724 - app-emulation/virtualbox-5.1.10 fails to import new images
Summary: app-emulation/virtualbox-5.1.10 fails to import new images
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Lars Wendler (Polynomial-C) (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-05 20:35 UTC by Joakim Tjernlund
Modified: 2021-11-02 22:02 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joakim Tjernlund 2016-12-05 20:35:09 UTC
Recently our users started to complain over not beeing able to import new Windows
images into Virtual box, the machine just froze in while importing.

A little investigation revealed this in the logs:
0:00:00.209199 nspr-2   Failed to open "/dev/vboxdrvu", errno=13,

looking ls -ld  /dev/vbox*
crw------- 1 root root      10, 57 Nov 11 16:20 /dev/vboxdrv
crw------- 1 root root      10, 56 Nov 11 16:20 /dev/vboxdrvu
crw------- 1 root root      10, 55 Nov 11 16:20 /dev/vboxnetctl
drwxr-x--- 3 root vboxusers     60 Nov 11 16:20 /dev/vboxusb/

So just root may open these. Googling around one could find the advise to create:
cat /lib/udev/rules.d/20-virtualbox2.rules 
KERNEL=="vboxdrv", NAME="vboxdrv", OWNER="root", GROUP="vboxusers", MODE="0660"
KERNEL=="vboxdrvu", NAME="vboxdrvu", OWNER="root", GROUP="vboxusers", MODE="0660"
KERNEL=="vboxnetctl", NAME="vboxnetctl", OWNER="root",GROUP="vboxusers", MODE="0660"

After this the privs got better:
ls -ld /dev/vbox*
crw-rw---- 1 root vboxusers 10, 53 Dec  5 16:24 /dev/vboxdrv
crw-rw---- 1 root vboxusers 10, 52 Dec  5 16:24 /dev/vboxdrvu
crw-rw---- 1 root vboxusers 10, 51 Dec  5 16:24 /dev/vboxnetctl
drwxr-x--- 3 root vboxusers     60 Dec  5 16:24 /dev/vboxusb/

and the import now succeed.

I am not sure this is the correct fix but something need to be done.
Comment 1 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2016-12-06 00:51:03 UTC
To be honest I'm not sure how to properly handle this. 

I do not see such a udev rules file in their binary releases.
Comment 2 Joakim Tjernlund 2016-12-06 08:20:36 UTC
(In reply to Lars Wendler (Polynomial-C) from comment #1)
> To be honest I'm not sure how to properly handle this. 
> 
> I do not see such a udev rules file in their binary releases.

Me neither, did a quick search and found in https://build.opensuse.org/package/revisions/Virtualization/virtualbox?showall=1

Hi Larry,

thanks for the positive response.

Sure, let your fix settle before taking the next.

Here's a small change on top, that avoids a chkstat build verification issue.

- adjust file attributes on SUID helpers to avoid chkstat issues

- remove obsolete libgsoap-devel (again)
- remove /usr/lib/udev/rules.d/60-vboxdrv.rules
  - it is overruled from vboxdrv init script anyway
  - vboxdrv generates a /etc/udev/rules.d/60-vboxdrv.rules file
    on _every_ start, note that fact in /etc/default/virtualbox
    and describe a strategy to control this behaviour
- relocate VBoxCreateUSBNode.sh to /usr/lib/virtualbox
  this is, where vboxdrv, resp. the generated 60-vboxdrv.rules
  file is expecting it

Can you make sense of that?
Comment 3 Joakim Tjernlund 2021-11-02 22:02:59 UTC
I think this is fixed long agao.