Bug 192359 - emulators/virtualbox-ose-additions 11.0-CURRENT VBoxService doesn't start
Summary: emulators/virtualbox-ose-additions 11.0-CURRENT VBoxService doesn't start
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Jung-uk Kim
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-03 15:50 UTC by palik
Modified: 2019-04-10 23:12 UTC (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description palik 2014-08-03 15:50:48 UTC
Hi,
Virtualbox + additions installation and settings are done as describet by 
https://wiki.freebsd.org/VirtualBox

Indeed VBoxService doesn't start.

% uname -a
FreeBSD pa-hpbook 11.0-CURRENT FreeBSD 11.0-CURRENT #1 r264145: Sat Apr  5 21:20:21 CEST 2014     palik@pa-hpbook:/usr/obj/usr/src/sys/MYIPSEC  amd64
% kldstat| grep vbox        
 4    1 0xffffffff81e17000 253cb    vboxguest.ko
 5    1 0xffffffff81e3d000 9b42     vboxvideo.ko
18    2 0xffffffff81ebd000 298f     vboxnetflt.ko
19    2 0xffffffff81ec0000 33c95    vboxdrv.ko
21    1 0xffffffff81ef9000 3f56     vboxnetadp.ko
% VBoxService                  
VBoxService: error: VbglR3Init failed with rc=VERR_FILE_NOT_FOUND
% VBoxClient-all 
Failed to connect to the VirtualBox kernel service
Failed to connect to the VirtualBox kernel service
Failed to connect to the VirtualBox kernel service
Failed to connect to the VirtualBox kernel service
VBoxClient: unrecognized option `--draganddrop'
Try `VBoxClient --help' for more information
Comment 1 John Marino freebsd_committer 2014-08-03 18:12:48 UTC
over to maintainer team...
Comment 2 Michael Grünewald 2017-12-02 09:45:04 UTC
This is still an issue, I am not sure which precise set of functionalities
it impairs in VirtualBox.

I experience the same problem on a fresh 11.1-RELEASE install on amd64:

  $ uname -a
  FreeBSD llea 11.1-RELEASE FreeBSD 11.1-RELEASE #0 r321309: Fri Jul 21 02:08:28 UTC 2017     root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64


The symptom is the same for me as reported by palik:

  $ sudo service vboxservice forcestart
  Starting vboxservice.
  VBoxService: error: VbglR3Init failed with rc=VERR_FILE_NOT_FOUND

It is possible to trace the error the condition to the VboxGuestR3Lib.cpp
file in the sources as a hint that the file VBOXGUEST_DEVICE_NAME cannot
be opened.  I believe this is the matching definition for FreeBSD

  include/VBox/VBoxGuest.h:# define VBOXGUEST_DEVICE_NAME          "/dev/vboxguest"

and I actually do not have a /dev/vboxguest file on my system, while the
kernel module with the same name is loaded.


The sources

  src/VBox/GuestHost/OpenGL/util/vboxhgsmi.c

also led me to think that this device might be created by the graphic
stack of VirtualBox.  I therefore rebuilt virtualbox-ose-additions
from the branch 2017Q4 of the ports tree, enabling the support for
OpenGL, but this did not change the situation in any visible way.
Comment 3 Mikhail Teterin freebsd_committer 2017-12-28 15:44:37 UTC
(In reply to Michael Grünewald from comment #2)
The /dev/vboxguest entry is created by the vboxguest.ko module upon /successful/ loading.

The module may file to initialize itself, but will still load -- and stay there, uselessly. If you are have the vboxguest service enabled to start at boot, please, post output of `grep -i vbox /var/run/dmesg.boot`.

I had this problem because my guest is FreeBSD/i386 using PAE -- but the port is usually built without -DPAE, which makes the port-built kernel-modules subtly incompatible with the actual kernel. You are using 64-bit guests, so that should not be the problem -- but something else is...
Comment 4 Michael Grünewald 2018-01-03 13:03:59 UTC
(In reply to Mikhail Teterin from comment #3)

Unfortunately neither dmesg.boot nor messages do display a useful
information about what could cause the failure.

I restarted my system with verbose boot mode to obtain additional
details, which caused no more insight:

  # grep -i box /var/run/dmesg.boot
  Preloaded elf obj module "/boot/modules/vboxdrv.ko" at 0xffffffff82559220.

  # grep -i vbox /var/log/messages
  Jan  3 13:58:41 llea kernel: Preloaded elf obj module "/boot/modules/vboxdrv.ko" at 0xffffffff82559220.
  Jan  3 13:58:42 llea root: /etc/rc: WARNING: failed to start vboxservice

It's rather hard to figure out a meaningful next troubleshooting test!
Comment 5 SF 2018-11-14 16:46:02 UTC
After freebsd-update upgrade 11.2-RELEASE-p4 from Release 11.1.
Comment 6 Alberto Mensi 2019-04-04 20:08:18 UTC
I still encounter the same problem today with virtualbox-5.2.26_4 on FreeBSD 11.2-RELEASE-p8, no matter if I compile the port or install the package.
I suggest to change importance to "affects many users"