# Virtualbox Guest Additions on FreeBSD not working



## Farhan Khan (May 4, 2018)

Hi all,

I have been struggling to get Virtualbox's guest additions working on FreeBSD 12.0-CURRENT. I am mostly interested in having the screen resize feature working in X. I installed `xorg-drivers` and `virtualbox-ose`. I initialized my `/usr/local/etc/X11/xorg.conf` file to initially changed Card0's driver to scfb and it worked. I then changed the driver to vboxvideo, and X still works, but resizing the window doesn't do anything.

I also have the following values set in `/etc/rc.conf`:

```
vboxguest_enable="YES"
vboxserver="YES"
vboxserver_flags="--disable-timesync"
```

Still, resizing the Virtualbox window does not change the display size. I still see scroll bars.
Any ideas?

Thanks!


----------



## rigoletto@ (May 4, 2018)

Topics about unsupported FreeBSD versions

FreeBSD as a Guest on VirtualBox

The problem in here is the fact you are using -CURRENT, what is the development branch (aka developer playground). Anything in -CURRENT can be broken at any time, so unless this problem is reproductive on any supported versions (IDK) we can assume that is related to some -CURRENT issue, then better ask to the proper Mailing List.

The last time I used VirtualBox was not long ago and everything worked as expected on 11.1R.

Btw, why not use BHyVe? There are some tools to simplify the use, like sysutils/vm-bhyve.

EDIT:

An update to emulators/virtualbox-ose just come out:



> Fix build on head after r333077.


----------



## Farhan Khan (May 4, 2018)

I just tried it on FreeBSD 11. Same result.

I am running this from a Windows machine. However, does Bhyve have a Virtualbox-like front-end interface?


----------



## SirDice (May 4, 2018)

Farhan Khan said:


> I just tried it on FreeBSD 11.


11.0 or 11.1? The distinction is important because 11.0 is EoL. 



Farhan Khan said:


> Still, resizing the Virtualbox window does not change the display size. I still see scroll bars.


Double check if the kernel modules are actually loaded. If there's a difference in kernel versions they will fail to load. Check /var/log/Xorg.0.log and verify if vboxvideo is correctly loading. Also make sure to start /usr/local/bin/VBoxClient your ~/.xinitrc:

```
[ -x /usr/local/bin/VBoxClient-all ] && /usr/local/bin/VBoxClient-all
```
(this bit of code checks if it exists before trying to run it. This will prevent errors in case you don't have the client tools installed.)


----------



## drhowarddrfine (May 4, 2018)

I believe that's supposed to be 
	
	



```
vboxservice_enable="YES"
```


----------



## Farhan Khan (May 5, 2018)

I got it!! For some reason, it was not working when I was logging in as root, but as a non-root user with a window manager setup, it was working just fine (and that's what I plan to use anyways). Root as just running with stock Xorg, without KDE or the like.


----------

