Running Virtualbox ON OPNSense

Started by doktor_g, April 18, 2021, 04:53:45 PM

Previous topic - Next topic
Hi guys,

first (since this is my first post), THX and bedankt for this great software.

I´m using OPNSense @Home (2 Intel Atom boxes with 4x LAN) since I want to separate my home net from my DMZ where I run a few (mostly virtual) servers hosting small private websites. So no big loads involved or possible money loss in case of unavailability of one of the firewalls.

I would like to run virtual machines in Virtualbox on the firewalls (tied only to the LAN interface, so not visible from outside). I installed from FreeBSD pkg repo but failed to load vboxdrv.ko:

kldload: an error occurred while loading module vboxdrv. Please check dmesg(8) for more details.

and in dmesg:

KLD vboxdrv.ko: depends on kernel - not available or version mismatch
linker_load_file: /boot/modules/vboxdrv.ko - unsupported file type

Which I would assume is related to the HardenedBSD kernel used in OPNSense.

However, make install from ports results in a note that the system is missing 32 bit libs, which I got from FreeBSD just to find that the port relies on gsoap_2.8.112.zip from FreeBSD distcache which is not available under the URL in the script.

As it seems to me, running Virtualbox is not supported or maybe even deactivated for security reasons (I know, HardenedBSD comes w/o the 32 bit libs).
Is here anyone around who knows a bit more about this or was able to successfully run virtualbox on OPNSense?
Any hint would be appreciated.

Regards
Doktor G.

I'd recommend going the other route:
install a hypervisor on bare metal (i.e. ProxMox) and run all needed VMs including the OPNsense box virtualized. You'll always have a hard time updating an appliance like OPNsense with custom software.

Having a hypervisor gives you the opportunity to make snapshots prior to updating OPNsense. Saved me a couple of times from reinstalling.
,,The S in IoT stands for Security!" :)

Quote from: doktor_g on April 18, 2021, 04:53:45 PM
Hi guys,

first (since this is my first post), THX and bedankt for this great software.

I´m using OPNSense @Home (2 Intel Atom boxes with 4x LAN) since I want to separate my home net from my DMZ where I run a few (mostly virtual) servers hosting small private websites. So no big loads involved or possible money loss in case of unavailability of one of the firewalls.

I would like to run virtual machines in Virtualbox on the firewalls (tied only to the LAN interface, so not visible from outside). I installed from FreeBSD pkg repo but failed to load vboxdrv.ko:

kldload: an error occurred while loading module vboxdrv. Please check dmesg(8) for more details.

and in dmesg:

KLD vboxdrv.ko: depends on kernel - not available or version mismatch
linker_load_file: /boot/modules/vboxdrv.ko - unsupported file type

Which I would assume is related to the HardenedBSD kernel used in OPNSense.

However, make install from ports results in a note that the system is missing 32 bit libs, which I got from FreeBSD just to find that the port relies on gsoap_2.8.112.zip from FreeBSD distcache which is not available under the URL in the script.

As it seems to me, running Virtualbox is not supported or maybe even deactivated for security reasons (I know, HardenedBSD comes w/o the 32 bit libs).
Is here anyone around who knows a bit more about this or was able to successfully run virtualbox on OPNSense?
Any hint would be appreciated.

Regards
Doktor G.

I'm facing the exact same problem... I have an appliance similar the one you have and want to install a vm with virtualbox headless using bridge... baremetal is not an option..

Did you get it working?

If so, please share your experience :D