vbox 2 problems with FreeBSD as guest on Virtualbox

I am having these two problems with FreeBSD running as guest on Virtualbox:

1. I can't ssh to the guest from my Linux host. I know sshd is running and allows password logins. I can ssh the VM from within the VM itself. But I can't from the host machine. I've tried all possible kinds of network configuration on Virtualbox including port mapping. Any ideas? Shared folders work though.

2. When I play a video, it's so slow and jerky it's unwatchable. If also affects general mp3/wav/audio playback. I had the same problem with a Linux VM, but solved that choosing another sound card in Virtualbox. That isn't helping with FreeBSD though. Again, any ideas?

TIA
 
It's a while since I had a FreeBSD system running in VirtualBox, but your problems are not unusual.

If you are using Linux as the virtualisation host, tell us how you have set up the bridge.

You don't identify the virtual network adapter type, nor the virtual video setup. Knowing all these things is seminal to diagnosis...

You probably have chosen the wrong configuration for your network bridge. There certainly exist options that prevent your VM from "seeing" the virtualisation host.

For the video, first try disabling 3D is the setup.
 
I had been getting an IP in the range of 10.0.*.* in FreeBSD (ifconfig -a), but now I get one in the range of 192.168.*.* and I can finally ssh into it. Go figure.

For the video, I disabled 3D and the problem remains. Plain audio (mp3) is affected too. Badly.
 
# pkg install strawberry
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
pkg: No packages available to install matching 'strawberry' have been found in the repositories

I am using mpv.
 
Oh, it's strawberry-qt5.

OK, I found it and installed it. Problem remains.

Extremely quiet too. Barely audible.
 
The sound issue might be a hard problem in the driver,

You can, however, use jackd to set up networked audio to the host. (and put pulseaudio on top of jack)
 
You could try to change the value of
sysctl hw.snd.vpc_0db

That didn't make any difference.
From the package message for guest additions:



So,



– if you have not already done so, reselect VBoxSVGA.

VBoxSVGA doesn't work for me. It boots, I run startx then this happens:

VBoxSVGA.png


Here is the log:

Code:
[    20.353]
X.Org X Server 1.21.1.13
X Protocol Version 11, Revision 0
[    20.353] Current Operating System: FreeBSD  14.0-RELEASE FreeBSD 14.0-RELEASE #0 releng/14.0-n265380-f9716eee8ab4: Fri Nov 10 05:57:23 UTC 2023     root@releng1.nyi.freeb
sd.org:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64
[    20.353] 
[    20.353] Current version of pixman: 0.42.2
[    20.353]    Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
[    20.353] Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[    20.353] (==) Log file: "/var/log/Xorg.0.log", Time: Sun May 26 16:21:27 2024
[    20.353] (==) Using system config directory "/usr/local/share/X11/xorg.conf.d"
[    20.353] (==) No Layout section.  Using the first Screen section.
[    20.353] (==) No screen section available. Using defaults.
[    20.353] (**) |-->Screen "Default Screen Section" (0)
[    20.353] (**) |   |-->Monitor "<default monitor>"
[    20.353] (==) No monitor specified for screen "Default Screen Section".
        Using a default monitor configuration.
[    20.353] (**) Allowing byte-swapped clients
[    20.353] (==) Automatically adding devices
[    20.353] (==) Automatically enabling devices
[    20.353] (==) Automatically adding GPU devices
[    20.353] (==) Automatically binding GPU devices
[    20.353] (==) Max clients allowed: 256, resource mask: 0x1fffff
[    20.353] (==) FontPath set to:
        /usr/local/share/fonts/misc/,
        /usr/local/share/fonts/TTF/,
        /usr/local/share/fonts/OTF/,
        /usr/local/share/fonts/Type1/,
        /usr/local/share/fonts/100dpi/,
        /usr/local/share/fonts/75dpi/,
        catalogue:/usr/local/etc/X11/fontpath.d
[    20.353] (==) ModulePath set to "/usr/local/lib/xorg/modules"
[    20.353] (II) The server relies on udev to provide the list of input devices.
        If no devices become available, reconfigure udev or disable AutoAddDevices.
[    20.353] (II) Module ABI versions:
[    20.353]    X.Org ANSI C Emulation: 0.4
[    20.353]    X.Org Video Driver: 25.2
[    20.353]    X.Org XInput driver : 24.4
[    20.353]    X.Org Server Extension : 10.0
[    20.353] (--) PCI:*(0@0:2:0) 80ee:beef:15ad:0405 rev 0, Mem @ 0xe0000000/134217728, 0x00000000/2097152, I/O @ 0x00000000/16, BIOS @ 0x????????/65536
[    20.353] (II) LoadModule: "glx"
[    20.353] (II) Loading /usr/local/lib/xorg/modules/extensions/libglx.so
[    20.353] (II) Module glx: vendor="X.Org Foundation"
[    20.353]    compiled for 1.21.1.13, module version = 1.0.0
[    20.353]    ABI class: X.Org Server Extension, version 10.0
[    20.353] (==) Matched vboxvideo as autoconfigured driver 0
[    20.353] (==) Matched modesetting as autoconfigured driver 1
[    20.353] (==) Matched scfb as autoconfigured driver 2
[    20.353] (==) Matched vesa as autoconfigured driver 3
[    20.353] (==) Assigned the driver to the xf86ConfigLayout
[    20.353] (II) LoadModule: "vboxvideo"
[    20.353] (II) Loading /usr/local/lib/xorg/modules/drivers/vboxvideo_drv.so
[    20.353] (II) Module vboxvideo: vendor="Oracle Corporation"
[    20.353]    compiled for 1.21.1.12, module version = 1.0.1
[    20.353]    Module class: X.Org Video Driver
[    20.353]    ABI class: X.Org Video Driver, version 25.2
[    20.353] (**) Load address of symbol "VBOXVIDEO" is 0x833ac14d0
[    20.353] (II) LoadModule: "modesetting"
[    20.353] (II) Loading /usr/local/lib/xorg/modules/drivers/modesetting_drv.so
[    20.353] (II) Module modesetting: vendor="X.Org Foundation"
[    20.353]    compiled for 1.21.1.13, module version = 1.21.1
[    20.353]    Module class: X.Org Video Driver
[    20.353]    ABI class: X.Org Video Driver, version 25.2
[    20.353] (II) LoadModule: "scfb"
[    20.353] (II) Loading /usr/local/lib/xorg/modules/drivers/scfb_drv.so
[    20.362] (II) Module scfb: vendor="X.Org Foundation"
[    20.362]    compiled for 1.21.1.13, module version = 0.0.5
[    20.362]    ABI class: X.Org Video Driver, version 25.2
[    20.362] (II) LoadModule: "vesa"
[    20.362] (II) Loading /usr/local/lib/xorg/modules/drivers/vesa_drv.so
[    20.362] (II) Module vesa: vendor="X.Org Foundation"
[    20.362]    compiled for 1.21.1.13, module version = 2.5.0
[    20.362]    Module class: X.Org Video Driver
[    20.362]    ABI class: X.Org Video Driver, version 25.2
[    20.362] (II) VBoxVideo: guest driver for VirtualBox: vbox
[    20.362] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[    20.362] (II) scfb: driver for wsdisplay framebuffer: scfb
[    20.362] (II) VESA: driver for VESA chipsets: vesa
[    20.362] (--) Using syscons driver with X support (version 2.0)
[    20.362] (--) using VT number 9

[    20.362] (WW) Falling back to old probe method for modesetting
[    20.362] (EE) open /dev/dri/card0: No such file or directory
[    20.362] (WW) Falling back to old probe method for scfb
[    20.362] scfb trace: probe start
[    20.362] scfb trace: probe done
[    20.362] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[    20.362] (II) VBoxVideo(0): VirtualBox guest additions video driver version 6.1
[    20.362] (II) Loading sub module "ramdac"
[    20.362] (II) LoadModule: "ramdac"
[    20.362] (II) Module "ramdac" already built-in
[    20.362] (II) Loading sub module "fb"
[    20.362] (II) LoadModule: "fb"
[    20.362] (II) Module "fb" already built-in
[    20.362] (II) Loading sub module "shadowfb"
[    20.362] (II) LoadModule: "shadowfb"
[    20.362] (II) Loading /usr/local/lib/xorg/modules/libshadowfb.so
[    20.362] (II) Module shadowfb: vendor="X.Org Foundation"
[    20.362]    compiled for 1.21.1.13, module version = 1.0.0
[    20.362]    ABI class: X.Org ANSI C Emulation, version 0.4
[    20.362] (II) Loading sub module "vgahw"
[    20.362] (II) LoadModule: "vgahw"
[    20.362] (II) Loading /usr/local/lib/xorg/modules/libvgahw.so
[    20.362] (II) Module vgahw: vendor="X.Org Foundation"
[    20.362]    compiled for 1.21.1.13, module version = 0.1.0
[    20.362]    ABI class: X.Org Video Driver, version 25.2
[    20.362] (II) VBoxVideo(0): Creating default Display subsection in Screen section
        "Default Screen Section" for depth/fbbpp 24/32
[    20.362] (==) VBoxVideo(0): Depth 24, (--) framebuffer bpp 32
[    20.362] (II) VBoxVideo(0): Virtual size is 32766x32766 (pitch 32766)
[    20.362] (**) VBoxVideo(0):  Built-in mode "800x600": 29.3 MHz (scaled from 0.0 MHz), 36.4 kHz, 60.0 Hz
[    20.362] (II) VBoxVideo(0): Modeline "800x600"x0.0   29.31  800 802 804 806  600 602 604 606 (36.4 kHz b)
[    20.362] (**) VBoxVideo(0):  Built-in mode "800x600": 29.3 MHz (scaled from 0.0 MHz), 36.4 kHz, 60.0 Hz
[    20.362] (II) VBoxVideo(0): Modeline "800x600"x0.0   29.31  800 802 804 806  600 602 604 606 (36.4 kHz b)
[    20.362] (II) VBoxVideo(0): vgaHWGetIOBase: hwp->IOBase is 0x03d0
[    20.362] (==) VBoxVideo(0): RGB weight 888
[    20.362] (==) VBoxVideo(0): Default visual is TrueColor
[    20.362] (==) VBoxVideo(0): Using gamma correction (1.0, 1.0, 1.0)
[    20.362] (==) VBoxVideo(0): DPI set to (96, 96)
[    20.362] (II) UnloadModule: "modesetting"
[    20.362] (II) Unloading modesetting
[    20.362] (II) UnloadModule: "scfb"
[    20.362] (II) Unloading scfb
[    20.362] (II) UnloadModule: "vesa"
[    20.362] (II) Unloading vesa
[    20.362] (EE)
Fatal server error:
[    20.362] (EE) AddScreen/ScreenInit failed for driver 0
[    20.362] (EE)
[    20.362] (EE)
Please consult the The X.Org Foundation support
         at http://wiki.x.org
 for help.
[    20.362] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[    20.362] (EE)
[    20.362] (EE) Server terminated with error (1). Closing log file.
 
Install emulators/virtualbox-ose-additions on FreeBSD guest and add
vboxguest_enable="YES"
vboxservice_enable="YES"

in /etc/rc.conf.
Also, create a file for the video driver: /usr/local/etc/X11/xorg.conf.d/vboxdriver.conf
Code:
Section "Device"
    Identifier "Card0"
    Driver "vboxvideo"
EndSection

For ssh in FreeBSD guest use port-forwarding.

vboxssh.png

ssh -p 2222 127.0.0.1
 
Thanks, but that video tweak didn't work either. The same errors again.

I just noticed this in the log:

[20.362] (II) VBoxVideo(0): VirtualBox guest additions video driver version 6.1

I am using VirtualBox 6.0 because there are games that won't run on 6.1.

I made a mistake here a few days ago and found that guest additions 6.1 don't work properly on VirtualBox 6.0.

Is it possible to remove guest additions 6.1 and install VirtualBox guest additions version 6.0?
 
But please note I already have full resolution using VBoxVGA instead of VBoxSVGA.

The real problem I still have is the super sluggish sound.
 
Did you try another audio card from settings?

Do you mean in Virtualbox? Yes, all of them. ICH AC97 and Intel HD Audio are super sluggish and Soundblaster 16 makes no sound at all. The same with Linux guest except that Intel HD Audio works on guest Linux.
 
I've just tested sound with Intel HD Audio "card" and everything work normal. (FreeBSD 13.3 host and FreeBSD 14.1-RC-1 guest). My guess is that your problem is with the audio card/driver on your GNU/Linux host.
 
The problem can't be in the host. Sound works fine in the host and I even said it works on a Linux guest with the Intel HD Audio option. I have a Windows XP guest too and sound works in it.
 
Before anything else, please, update the OS.

FreeBSD 14.0-RELEASE FreeBSD 14.0-RELEASE #0 releng/14.0-n265380-f9716eee8ab4: Fri Nov 10 05:57:23 UTC 2023 root@releng1.nyi.freeb sd.org:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64

There was a subsequent erratum for a well-known issue that affected performance. Whilst this issue might be not a factor in your case, it is good practice to have an up-to-date system.

Given the timing, I recommend an upgrade to the one and only release candidate of 14.1.

Don't upgrade without first updating.

Thanks
 
Last edited:
Regarding your sound issues: is the Enable Audio Input checkbox in Vbox-Manager checked?
For me disabling this feature did the trick.
 
Before anything else, please, update the OS.

There was a subsequent erratum for a well-known issue that affected performance. Whilst this issue might be not a factor in your case, it is good practice to have an up-to-date system.

Given the timing, I recommend an upgrade to the first release candidate of 14.1. It's currently expected to be the final.

Don't upgrade without first updating.

I did the update and the upgrade. Everything seems to have worked out flawlessly.
But the problem remains.
 
Back
Top