# cannot start guest services in VirtualBox



## totheedgeofnight (May 3, 2014)

Hello everyone, I'm new to BSD. 

I was trying to get X working on my machine but it doesn't start. I've noticed that during startup it stays that it was unable to start the vbox module. I tried to start it manually from /usr/local/etc/rc.d with `./vboxguest start` and `./vboxservice start`, but the first one returns  


```
./vboxguest: WARNING: Can't load vboxguest module.
```

and the second one 


```
VBoxService: error: VbglR3Init failed with rc=VERR_FILE_NOT_FOUND. 
./vboxguest: WARNING: Can't load vboxguest module.
```

I'm running VirtualBox 4.3.10 on OSX Mavericks, and FreeBSD 10.0. All the packages are the last version available. I have tried to deinstall and reinstall emulators/virtualbox-ose-addons, but with no success. I have installed anything with `make install` and portsnap(). Maybe something went wrong during the installation? I don't know what to reinstall, apart from this.

I have compiled the kernel with the options 

```
options      VESA
options      SC_PIXEL_MODE
```
to get the high resolution console, I don't know if this means anything. 

Tell me if I should provide further information and thank you very much.


----------



## wblock@ (May 4, 2014)

In /etc/rc.conf, are both these lines present?

```
vboxguest_enable="YES"
vboxservice_enable="YES"
```

How was emulators/virtualbox-ose-additions installed, as a package or as a port?


----------



## totheedgeofnight (May 4, 2014)

wblock@ said:
			
		

> In /etc/rc.conf, are both these lines present?
> 
> ```
> vboxguest_enable="YES"
> ...


Yes, both. I noticed the line 
	
	



```
WARNING: Can't load vboxguest module.
```
 in the `dmesg` messages, I tried to start the service manually, but it showed the same message.



> How was emulators/virtualbox-ose-additions installed, as a package or as a port?


As a port, with `make install clean` in /usr/ports


----------



## wblock@ (May 4, 2014)

When you built the port, did you change the options, like enabling OPENGL?


----------



## totheedgeofnight (May 4, 2014)

Uhm, which options should I have changed? The openGL support was enabled, but I don't think I have changed any other option  :\


----------



## wblock@ (May 4, 2014)

No, the OPENGL option is off by default.  Use `cd /usr/ports/emulators/virtualbox-ose-addtions && make rmconfig` to clear all user-set options, then rebuild and reinstall the port.


----------



## totheedgeofnight (May 4, 2014)

wblock@ said:
			
		

> No, the OPENGL option is off by default.  Use `cd /usr/ports/emulators/virtualbox-ose-addtions && make rmconfig` to clear all user-set options, then rebuild and reinstall the port.


I turned that on, I am pretty sure. I'm gonna try to recompile it disabling that support!


----------



## totheedgeofnight (May 4, 2014)

I've recompiled it without openGL support with `make deinstall && make rmconfig && make install clean`, but it still gives the same error.


----------



## wblock@ (May 4, 2014)

You'll have to unload the old kernel modules and load the new ones.  Restarting the services might do that.  Or restart the VM to do that automatically.


----------



## totheedgeofnight (May 5, 2014)

I have already rebooted the machine


----------



## Reface (Jan 3, 2016)

I had the same error. 
So.

I `made deinstall` for virtualbox-ose-kmod and virtualbox-ose. 

Then made `make rmconfig` for virtualbox-ose-kmod and virtualbox-ose.
After it. `make install clean` for virtualbox-ose-kmod with default options. And `make install clean` for virtualbox-ose with such options:


```
===> The following configuration options are available for virtualbox-ose-4.3.34_1:
  DBUS=on: D-Bus IPC system support
  DEBUG=off: Debug symbols, additional logs and assertions
  GUESTADDITIONS=off: Build with Guest Additions
  MANUAL=on: Build with user manual
  NLS=on: Native Language Support
  PULSEAUDIO=off: PulseAudio sound server support
  PYTHON=on: Python bindings or support
  QT4=on: Build with QT4 Frontend
  UDPTUNNEL=on: Build with UDP tunnel support
  VDE=off: Build with VDE support
  VNC=on: Build with VNC support
  VPX=off: Use vpx for video capturing
  WEBSERVICE=off: Build Webservice
  X11=on: X11 (graphics) support
===> Use 'make config' to modify these settings
```
So after it no errors `/etc/rc.d/vboxguest start` and `/etc/rc.d/vboxservice start`.


----------



## wblock@ (Jan 4, 2016)

This thread was a year old.  But anyway, all that is needed in a guest is emulators/virtualbox-ose-additions.  There is no reason to install the kernel module or VirtualBox itself in a VM, since it can't run there anyway.


----------

