[Bug 1060072] New: virtualbox drivers vboxdrv don't work if virtualbox-qt is not installed
http://bugzilla.suse.com/show_bug.cgi?id=1060072 Bug ID: 1060072 Summary: virtualbox drivers vboxdrv don't work if virtualbox-qt is not installed 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: Ralf.Friedl@online.de QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- I have current virtualbox-5.1.26-2.7.x86_64 installed. Part of this package is the script /usr/lib/virtualbox/vboxdrv.sh that is supposed to load the the vbox kernel drivers (vboxdrv,vboxpci,vboxnetadp,vboxnetflt). In lines 55-68 the script tests for the existence of /usr/lib/virtualbox/VirtualBox, but /usr/lib/virtualbox/VirtualBox is not part of the package virtualbox, it is part of virtualbox-qt. What is worse, the script doesn't just abort, it also does "exit 0", claiming everything was fine. Now there are different ways to fix this. I would suggest removing the test completely, as the file is part of a package and if the package is there and the service is started, obviously the drivers should be loaded and if that doesn't work, it should indicate an error. Another possibility would be to change the test from /usr/lib/virtualbox/VirtualBox to /usr/lib/virtualbox/VBoxManage, which is part of the package virtualbox. On another note, can you move the file /usr/lib/virtualbox/VBoxDbg.so from virtualbox to virtualbox-qt? /usr/lib/virtualbox/VBoxDbg.so is the only file in package virtualbox that needs libQt5Core, libQt5Gui and libQt5Widgets, and I think the whole point of having the separate package virtualbox-qt is that virtualbox doesn't pull in the Qt and X libraries. Or do you want me to create another bug report for that? I can verify that after I installed virtualbox with --nodeps and created an empty file /usr/lib/virtualbox/VirtualBox with executable bit set so that /usr/lib/virtualbox/vboxdrv.sh would load the drivers, I could use virtualbox in headless mode. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1060072
Charles Arnold
http://bugzilla.suse.com/show_bug.cgi?id=1060072
http://bugzilla.suse.com/show_bug.cgi?id=1060072#c1
Larry Finger
http://bugzilla.suse.com/show_bug.cgi?id=1060072
http://bugzilla.suse.com/show_bug.cgi?id=1060072#c2
--- Comment #2 from Ralf Friedl
http://bugzilla.suse.com/show_bug.cgi?id=1060072
http://bugzilla.suse.com/show_bug.cgi?id=1060072#c3
--- Comment #3 from Larry Finger
http://bugzilla.suse.com/show_bug.cgi?id=1060072
http://bugzilla.suse.com/show_bug.cgi?id=1060072#c4
--- Comment #4 from Ralf Friedl
http://bugzilla.suse.com/show_bug.cgi?id=1060072
http://bugzilla.suse.com/show_bug.cgi?id=1060072#c5
--- Comment #5 from Bernhard Wiedemann
http://bugzilla.suse.com/show_bug.cgi?id=1060072
http://bugzilla.suse.com/show_bug.cgi?id=1060072#c6
Ralf Friedl
http://bugzilla.suse.com/show_bug.cgi?id=1060072
http://bugzilla.suse.com/show_bug.cgi?id=1060072#c7
--- Comment #7 from Bernhard Wiedemann
http://bugzilla.suse.com/show_bug.cgi?id=1060072
http://bugzilla.suse.com/show_bug.cgi?id=1060072#c8
--- Comment #8 from Bernhard Wiedemann
http://bugzilla.suse.com/show_bug.cgi?id=1060072
Swamp Workflow Management
http://bugzilla.suse.com/show_bug.cgi?id=1060072
http://bugzilla.suse.com/show_bug.cgi?id=1060072#c10
--- Comment #10 from Ralf Friedl
http://bugzilla.suse.com/show_bug.cgi?id=1060072
http://bugzilla.suse.com/show_bug.cgi?id=1060072#c11
--- Comment #11 from Swamp Workflow Management
http://bugzilla.suse.com/show_bug.cgi?id=1060072
Swamp Workflow Management
VIRTUALBOX="${INSTALL_DIR}/VirtualBox" VBOXMANAGE="${INSTALL_DIR}/VBoxManage" BUILDINTMP="${MODULE_SRC}/build_in_tmp" if test -u "${VIRTUALBOX}"; then GROUP=root DEVICE_MODE=0600 else GROUP=vboxusers DEVICE_MODE=0660 fi With the change, INSTALL_DIR is empty, resulting in VIRTUALBOX=/VirtualBox and VBOXMANAGE=/VBoxManage. INSTALL_DIR should be set to /usr/lib/virtualbox. VIRTUALBOX is only used in the "test -u" above. As VirtualBox is no longer in
http://bugzilla.suse.com/show_bug.cgi?id=1060072
http://bugzilla.suse.com/show_bug.cgi?id=1060072#c12
Ralf Friedl
INSTALL_DIR=/usr/lib/virtualbox VBOXMANAGE="${INSTALL_DIR}/VBoxManage" BUILDINTMP="${MODULE_SRC}/build_in_tmp" if test -u "${VBOXMANAGE}"; then GROUP=root DEVICE_MODE=0600 else GROUP=vboxusers DEVICE_MODE=0660 fi
The GROUP and DEVICE_MODE are only used in setup, which is only called explicitly or in start when the modprobe vboxdrv fails. That means that as long as the matching virtualbox-host-kmp is installed, setup will not be called and the value of GROUP and DEVICE_MODE doesn't matter. But setup doesn't just compile the kernel modules, it also creates a file /etc/udev/rules.d/60-vboxdrv.rules, so setup not being called means that ./etc/udev/rules.d/60-vboxdrv.rules is not created. The file looks like this. The values of MODE and GROUP may vary depending on the setuid in the test above.
KERNEL=="vboxdrv", NAME="vboxdrv", OWNER="root", GROUP="root", MODE="0600" KERNEL=="vboxdrvu", NAME="vboxdrvu", OWNER="root", GROUP="root", MODE="0666" KERNEL=="vboxnetctl", NAME="vboxnetctl", OWNER="root", GROUP="root", MODE="0600" SUBSYSTEM=="usb_device", ACTION=="add", RUN+="/usr/lib/virtualbox/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass}" SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", RUN+="/usr/lib/virtualbox/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass}" SUBSYSTEM=="usb_device", ACTION=="remove", RUN+="/usr/lib/virtualbox/VBoxCreateUSBNode.sh --remove $major $minor" SUBSYSTEM=="usb", ACTION=="remove", ENV{DEVTYPE}=="usb_device", RUN+="/usr/lib/virtualbox/VBoxCreateUSBNode.sh --remove $major $minor" I don't know what exactly this file does, and on my headless machine I don't use USB devices in VirtualBox, so it probably doesn't matter. On the other hand, if the script generates this file, there will probably be a reason for it.
Regarding headless mode, these files require X11 libraries and are not needed for headless mode. I have running virtual machines without these files present at the moment, and without X11 libraries. These files could be moved to virtualbox-qt. /usr/bin/VBoxSDL /usr/lib/virtualbox/VBoxKeyboard.so /usr/lib/virtualbox/VBoxOGLrenderspu.so /usr/lib/virtualbox/VBoxSDL /usr/lib/virtualbox/VBoxSDL.so /usr/lib/virtualbox/VBoxSharedClipboard.so /usr/lib/virtualbox/VBoxSharedCrOpenGL.so -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1060072
http://bugzilla.suse.com/show_bug.cgi?id=1060072#c13
--- Comment #13 from Bernhard Wiedemann
http://bugzilla.suse.com/show_bug.cgi?id=1060072
http://bugzilla.suse.com/show_bug.cgi?id=1060072#c15
--- Comment #15 from Bernhard Wiedemann
http://bugzilla.suse.com/show_bug.cgi?id=1060072
http://bugzilla.suse.com/show_bug.cgi?id=1060072#c16
--- Comment #16 from Bernhard Wiedemann
http://bugzilla.suse.com/show_bug.cgi?id=1060072
Swamp Workflow Management
http://bugzilla.suse.com/show_bug.cgi?id=1060072
Swamp Workflow Management
http://bugzilla.suse.com/show_bug.cgi?id=1060072
http://bugzilla.suse.com/show_bug.cgi?id=1060072#c17
--- Comment #17 from Swamp Workflow Management
participants (1)
-
bugzilla_noreply@novell.com