On a fresh install of FreeBSD 12.2-RELEASE-p4 where FreeBSD is a virtualbox guest. Any attempt to start VBoxService results in an error message: VBoxService: error: VbglR3Init failed with rc=VERR_FILE_NOT_FOUND /usr/local/etc/rc.d/vboxeservice: WARNING: failed to start vboxservice No other error indications of how/why VBoxService start failure can be found in system logs. Followed instructions for installation from handbook, https://docs.freebsd.org/en_US.ISO8859-1/books/handbook/virtualization-guest-virtualbox.html, All packages installed via pkg (not ports). xorg-servier-1.20.9_1,1 xfce-4.16 virtualbox-ose-additions-5.2.44_3 Confirmed all library and kernel modules described in pkg-plist are present in system. Bug #192359 appears related but is unresolved. That bug appears to confuse whether FreeBSD is a guest or host.
Manually loading kernel module and starting service: # kldload /boot/modules/vboxguest # service vboxservice start is successful and without error. Problem appears to be a problem with where kernel modules are installed. Package instructions for virtualbox-ose-additions places kernel modules vboxservice.ko and vboxvfs.ko in directory /boot/modules(only items in directory).
(In reply to Scott Furry from comment #1) Try this: $ grep vbox /etc/rc.conf vboxguest_enable="YES" vboxservice_enable="YES"
(In reply to VVD from comment #2) Steps described already completed as instructions from handbook were followed exactly as given including editing /etc/rc.conf.
(In reply to VVD from comment #2) I haven't had to dig into kernel modules before. Learning process on my part. After some reading, I get it - 3rd party kernel modules go into /boot/modules(away from actual kernel modules). It seems unusual that starting a service comes back as 'file not found'. And when manually directing the loading of vboxservice.ko, service just starts. My impression is that there is a disconnect in paths being utilize when searching for a service's kernel module. Why /boot/modules is ignore or not used is a bit beyond me, at the moment.
I suspect that there may have been some issue with sequence of installation. Initially when I reported, I had installed virtualbox-ose-additions package prior to installing xorg. The virtualbox-ose-additions pulled in select xorg packages but not the xorg-server itself. I just finished a re-install from scratch but also ensuring that I followed the install sequence: xorg, xfce, virtualbox-ose-additions. After a reboot, the observed error with the service did not occur. I should note a couple of related items with the package install. While attempting to resolve guest display resolution, a web search brought me to this forum post - https://forums.freebsd.org/threads/i-cant-change-resolution-and-refresh-rate-on-virtualbox.75041/. The thread made clear to me two things: a) when using the VMSVGA display setting the user needs to install xf86-video-vmware package before display settings can be changed. The need for a video driver is not not mentioned in the handbook. b) there is a typo in /usr/local/bin/VBoxClient-all script. Line 38 should be changed from: /usr/bin/VboxClient --vmsvga-x11... to /usr/local/bin/VboxClient --vmsvga-x11... After change to script mentioned above, ensuring proper driver was installed, and following correct install sequence, the VBoxService appears to function as expected.