Oracle VM VirtualBox is a hosted hypervisor for x86 virtualisation.
Supported guests include BSD, Haiku, Linux, OS/2, ReactOS, Solaris and
Windows.
Guest Additions are available from: emulators/virtualbox-ose-additions
For the Extension Pack: FreeBSD is not a supported host platform.
Installation of the Pack will not extend the feature set.
===> The following configuration options are available for virtualbox-ose-6.1.50_20:
AIO=on: Enable Asyncronous IO support (check pkg-message)
ALSA=off: ALSA audio architecture support
DBUS=on: D-Bus IPC system support
DEBUG=off: Debug symbols, additional logs and assertions
DOCS=on: Build and/or install documentation
GUESTADDITIONS=off: Build with Guest Additions
NLS=on: Native language support (requires QT5)
OPUS=off: Use libvpx for audio recording (requires VPX)
PYTHON=on: Python bindings or support
QT5=on: Build with Qt5 frontend (requires X11)
R0LOGGING=off: Enable R0 logging (requires DEBUG)
UDPTUNNEL=on: Build with UDP tunnel support
VBOXIMG=off: Build vboximg-mount (requires fuse-libs)
VDE=off: Build with VDE support
VNC=on: Build with VNC support
VPX=off: Use libvpx for video recording
WEBSERVICE=on: Build Webservice
X11=on: X11 (graphics) support
===> Use 'make config' to modify these settings
Reason:
In order to comply to hier(7), VirtualBox's configuration of non-default
IP ranges to be used in host-only mode moved from /etc/vbox/networks.conf
to ${LOCALBASE}/etc/vbox/networks.conf.
Reason:
emulators/virtualbox-ose has been updated to 6.1.18. This new
version only works on amd64 hardware.
Previous version 5.x of the virtualbox ports have been preserved
as emulators/virtualbox-ose-legacy and similarly named ports for
the other parts.
If you can't run the latest version or wish to stay with the old
version, please install the legacy ports.
Also the additions at present build successfully only for amd64.
If you need i386 additions you can fallback to the old legacy
ones.
NOTE: There is no support for moving saved running machine states
across major updates of virtualbox. It is recommended to properly
shutdown all virtual machines before upgrading. Otherwise the saved
state can simply be discarded after the upgrade, if it's not
important to preserve it.
It should also be possible to downgrade to the legacy ports and
shutdown the machine properly from the saved state and then upgrade
back again.
emulators/virtualbox-ose*: Flavorize
While here make non-functional changes related to indentation and
formatting, make simplification of CONFLICTS_INSTALL.
Sponsored by: UNIS Labs
emulators/virtualbox-ose{,-70,-71,-72,-legacy}: Improve port (non-functional)
- Replace ${PREFIX}/share/applications with ${DESKTOPDIR}.
- Replace "*" with . in COPYTREE_SHARE.
emulators/virtualbox-ose*: Add support of "Unattended Installation of Guest OS"
feature
Install files required by Unattended Installation of Guest OS feature.
These files were already prepared during the ports' build, so just add
them to the installation.
Details about this feature are here:
https://www.virtualbox.org/manual/topics/create-vm.html#tk_create-vm-unattended-install
Reported by: xin3qu via IRC (#freebsd-vbox @ Libera.Chat)
emulators/virtualbox-ose*: Exclude from extract bundled binary files of kBuild
Thes is ~430-640 files, ~30-55MB total for different platforms.
We are using devel/kBuild for build VirtualBox ports.
devel/kBuild is a newer version than the one included in the VirtualBox
tarballs.
emulators/virtualbox-ose{,-legacy}: Limit python to 3.10-3.11
This is temporary workaround for build error:
/usr/ports/emulators/virtualbox-ose/work/VirtualBox-6.1.50/src/libs/xpcom18a4/python/src/VariantUtils.cpp:197:7:
error: use of undeclared identifier 'PyUnicode_GET_SIZE'; did you mean
'PyDict_GET_SIZE'?
if (PyUnicode_GET_SIZE(val_use) == 0) {
^~~~~~~~~~~~~~~~~~
PyDict_GET_SIZE
/usr/local/include/python3.12/cpython/dictobject.h:53:26: note:
'PyDict_GET_SIZE' declared here
static inline Py_ssize_t PyDict_GET_SIZE(PyObject *op) {
^
/usr/ports/emulators/virtualbox-ose/work/VirtualBox-6.1.50/src/libs/xpcom18a4/python/src/VariantUtils.cpp:501:38:
error: use of undeclared identifier 'PyUnicode_AS_UNICODE'
FILL_SIMPLE_POINTER( PRUnichar,
*PyUnicode_AS_UNICODE(val_use) );
^
/usr/ports/emulators/virtualbox-ose/work/VirtualBox-6.1.50/src/libs/xpcom18a4/python/src/VariantUtils.cpp:829:8:
error: use of undeclared identifier 'PyUnicode_GetSize'
if (PyUnicode_GetSize(ob) == 0) {
^
Support for the python 3.12+ was added in the VirtualBox 7.0.
Maybe I'll partially port this in older VirtualBox ports later.
PR: 292189285957
emulators/virtualbox-ose{,-additions,-kmod}{,-nox11}: Deprecate and set to
expire on 2026-12-31
Upstream EOL reaches on 2024-01-31, use emulators/virtualbox-ose-*-72
instead.
PR: 290507
emulators/virtualbox-ose*: Fix vboxvfs build on 16-CURRENT
/wrkdirs/usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-6.1.50/src/VBox/Additions/freebsd/vboxvfs/vboxvfs_vnops.c:1271:9:
error: use of undeclared identifier 'NULLVP'
1271 | *vpp = NULLVP;
| ^
/wrkdirs/usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-6.1.50/src/VBox/Additions/freebsd/vboxvfs/vboxvfs_vnops.c:1281:3:
error: call to undeclared function 'VREF'; ISO C99 and later do not support
implicit function declarations [-Werror,-Wimplicit-function-declaration]
1281 | VREF(dvp);
| ^
Commits that broke the build:
https://cgit.freebsd.org/src/commit/sys/sys/vnode.h?id=7e4c451c12aeb26cc1179221b8230c491b17cf00https://cgit.freebsd.org/src/commit/sys/sys/vnode.h?id=01c8e2e33df81b242d73a23de49a6b61f33c24c1
PR: 289992
Reported by: pkg-fallout
MFH: 2025Q4
emulators/virtualbox-ose*: Improve rc script
- Add sort VMs by name during auto start and reverse sort during stop -
with this user can control the order in which VMs are started and stopped.
- Increase default delay between start VMs from 0 to 1 second -
useful when automatically starting more than "2-3" VMs.
emulators/virtualbox-ose{,-legacy}: Fix patch for build with libxml2 2.12.6+
Remove RT_NOTHROW_DEF: it is defined in VirtualBox itself, but was only
introduced in version 7.0.
PR: 287284279958
Fixes: 17271d3143c9 (Fix build with libxml2 2.12.6+)
emulators/virtualbox-ose{,-nox11}: Add patches for better graphics devices
support
While here refresh patches for graphics devices
PR: 286748
Tested by: Martin Birgmeier <d8zNeCFG@aon.at>, rkoberman@gmail.com
MFH: 2025Q2
emulators/virtualbox-ose-kmod{,-70,-legacy}: Fix the build after FreeBSD kernel
changes in 1500038
Update to chase removal of vm_page_next()
PR: 286206286193286204
Tested by: Graham Perrin <grahamperrin@gmail.com>
MFH: 2025Q2
python: bump all USE_PYTHON=distutils consumers after RUN_DEPENDS removal
Any missed ports, feel free to bump.
Any ports that need setuptools at runtime can have the devel/py-setuptools
manually added back to RUN_DEPENDS, but understand that this practice
is deprecated; see CHANGES for details.
emulators/virtualbox-ose-kmod: Add check for MAXCPU and mp_maxcpus before load
vboxdrv.ko
If the MAXCPU option is not the default for the running kernel, then
'kldload vboxdrv.ko' will result in a kernel panic.
Due to ABI difference (vboxdrv passes cpuset_t parameter (bitfield with
CPU_SETSIZE -> MAXCPU bits) into smp_rendezvous_cpus()) kernel panics
with "ncpus is 0 with non-zero map" message.
PR: 219913
emulators/virtualbox-ose{,-nox11}{,-legacy}: Fix listen VNC on TCP port on IPv6
address
Four new options are available:
- "VNCAddress4" -> IPv4 address to use
- "VNCPort4" -> IPv4 Port to use
- "VNCAddress6" -> IPv6 address to use
- "VNCPort6" -> IPv6 port to use
"TCP/Ports" is used for backward compatibility as IPv4 and IPv6 ports if
"VNCPort4" or "VNCPort6" is not defined.
Detailed description is here:
https://www.virtualbox.org/browser/vbox/trunk/src/VBox/ExtPacks/VNC/VBoxVNC.cpp#L361
PR: 193778
emulators/virtualbox-ose*: Improve ports
* Replace PORTVERSION with DISTVERSION.
* Fix CONFLICTS_INSTALL.
* Fix PYTHON in DEFAULT_OPTIONS in emulators/virtualbox-ose.
* Pet portclippy and portlint.
* Formatting and etc.
PR: 258159
emulators/virtualbox-ose-kmod: Fix build error since 1500027 (struct ifnet is
now hidden)
Based on patch from wulf.
PR: 282780
Tested by: groenveld@acm.org
filesystems: add new category for file systems and related utilities
The filesystems category houses file systems and file system utilities.
It is added mainly to turn the sysutils/fusefs-* pseudo-category into
a proper one, but is also useful for the sundry of other file systems
related ports found in the tree.
Ports that seem like they belong there are moved to the new category.
Two ports, sysutils/fusefs-funionfs and sysutils/fusefs-fusepak are
not moved as they currently don't fetch and don't have TIMESTAMP set
in their distinfo, but that is required to be able to push a rename
of the port by the pre-receive hook.
Approved by: portmgr (rene)
Reviewed by: mat
Pull Request: https://github.com/freebsd/freebsd-ports/pull/302
PR: 281988
all: drop support for expired FreeBSD 14.0
Simplify expressions for FreeBSD 13.X
Reviewed by: many
Differential Revision: https://reviews.freebsd.org/D46601
emulators/virtualbox-ose{,-nox11}: fix USB passthrough fails with: Failed to
create a proxy device for the USB device
Failed to create a proxy device for the USB device. (Error:
VERR_INVALID_PARAMETER)
00:00:24.961804 usbProxyConstruct: Failed to open '/dev/ugen0.6',
rc=VERR_INVALID_PARAMETER
00:00:24.961881 ERROR [COM]: aRC=NS_ERROR_FAILURE (0x80004005)
aIID={872da645-4a9b-1727-bee2-5585105b9eed} aComponent={ConsoleWrap}
aText={Failed to create a proxy device for the USB device. (Error:
VERR_INVALID_PARAMETER)}, preserve=false aResultDetail=-2
In commit
https://cgit.freebsd.org/src/commit/?id=9b077d72bcc313baea2b9283afc7f568739eaadc
+#define USB_FS_XFER_MAX 126
- if (fs_ep_ptr == NULL || ep_index_max > 127)
+ if (fs_ep_ptr == NULL || ep_index_max > USB_FS_XFER_MAX)
To fix VirtualBox decrease USBFBSD_MAXENDPOINTS from 127 to 126:
-#define USBFBSD_MAXENDPOINTS 127
+#define USBFBSD_MAXENDPOINTS 126
PR: 270900
Tested by: groenveld@acm.org, russo@bogodyn.org
Approved by: with hat of vbox (maintainer)
MFH: 2024Q3
emulators/virtualbox-ose: fix build emulators/virtualbox-ose-additions{,-nox11}
on main: error: unknown type name 'uma_zone_t'
In file included from
/wrkdirs/usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-6.1.50/src/VBox/Additions/freebsd/vboxvfs/vboxvfs_prov.c:42:
/wrkdirs/usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-6.1.50/src/VBox/Additions/freebsd/vboxvfs/vboxvfs.h:209:2:
error: unknown type name 'uma_zone_t'
209 | uma_zone_t sf_node_pool;
| ^
Reported by: pkg-fallout
MFH: 2024Q3
emulators/virtualbox-ose{,-nox11}: add vboxinit start/stop script for VMs which
is controlled from phpvirtualbox
Set the "Startup Mode" to "Automatic" for the virtual machine in
phpvirtualbox to automatically start the virtual machine during OS boot.
This script also stops virtual machines during reboot even if
vboxinit_enable="YES" is not present in /etc/rc.conf.
phpvirtualbox uses the "Web Service" (WEBSERVICE) to configure and
manage virtual machines, so we install the script only when the
WEBSERVICE option is enabled.
PR: 280062
emulators/virtualbox-ose: Refactor DOCS
Although the documentation builds fine currently however the doc
UserManual.pdf fails to build from the docbook with pdflatex from TeX
2024. So decouple the documentation file from the builds as an
additional DISTFILE. As this version is no longer supported by upstream
it is highly unlikely that the build of the documentation will be fixed
by upstream. Or unless someone has enough enthusiasm to fix the build
of the documentation once TeX 2024 hits the tree.
Approved by: portmgr (blanket)
Sponsored by: Nepustil
cleanup: remove occurrences of WITH_DEBUG
DEBUG like all ports features, must not ever be set in a port, they are
user facing features, that the user needs to enable in their
environment/make.conf, either by defining WITH_DEBUG globally, or by
setting WITH_DEBUG_PORTS with origin of ports they want DEBUG enabled
in.
*/*: Sunset 12.4-RELEASE/12-STABLE from ports tree
- Remove all references to defunct ARCH arm
- Remove all references to defunct ARCH sparc64
- Remove x11-drivers/xf86-video-sunffb which requires defunct sparc64
ARCH
- Remove sysutils/afbinit requires defunct sparc64 ARCH
- Remove all references to bktr driver
- Remove all references to defunct FreeBSD_12
- Remove all references to OSVERSION/OSREL corresponding to 12
- Remove conditionals in Mk/Uses/cabal.mk
- Remove sparc reference from Mk/Uses/qt-dist.mk
- Remove BROKEN_sparc64/NOT_FOR_ARCH=sparc64
- Remove BROKEN_FreeBSD_12* from:
- Remove OpenSSL patches from:
- Remove conditional flags for OSVERSION >= 1300000 to fixed flags.
Also move conditional flags for non sparc64/arm ARCH to fixed flags.
Reviewed by: brooks, jbeich, rene, salvadore
Differential Revision: https://reviews.freebsd.org/D42068
emulators/virtualbox-ose: add option to build vboximg-mount
Introduce new port option VBOXIMG that enables building and installing
"vboximg-mount" utility. It is not enabled by default as it needs
fusesfs-libs as another dependency.
The utility gives access to insides of VM images like .vdi files etc.
Use "vboximg-mount -g" to get access to files on internal file systems
not supported by native FreeBSD mount command. Refer to utility's
internal online help for syntax details and to original documentation:
https://docs.oracle.com/en/virtualization/virtualbox/6.0/user/vboximg-mount.html
PR: 274817
Tested by: vvd
Approved by: vbox (maintainer timeout over 2 weeks)
emulators/virtualbox-ose{,-legacy}: sort out options
Sort out options: order (portlint), convert to OPTION_*.
Add entry in "Troubleshooting" about "VERR_NO_MEMORY".
Force devel/llvm15 for emulators/virtualbox-ose-legacy on recent 14 with
llvm16 in base.
PR: 200764252227
Approved by: arrowd (mentor)
Differential Revision: https://reviews.freebsd.org/D40751
emulators/virtualbox-ose: Remove unnecessary dependency on 32-bit compat for
amd64
32-bit in-kernel support and lib32 libs are not necessary for VirtualBox 6.x,
so just remove this requirement.
Also the port support amd64 only - remove I386 from PLIST_SUB.
PR: 266382
Tested by: Olivier Certner <olivier.freebsd@free.fr>
Approved by: arrowd (mentor)
Differential Revision: https://reviews.freebsd.org/D40487
emulators/virtualbox-ose: on 14 "Failed to construct device 'VMMDev' instance #0
(VERR_INTERNAL_ERROR_3)"
Force llvm from ports from 11 to 14 - by default it'll pick 14.
Use VBOX_LLVM_VER in make.conf to define different llvm.
PR: 270189
Reviewed by: cy, grahamperrin
Tested by: cy, grahamperrin, groenveld@acm.org, rkoberman@gmail.com
Approved by: arrowd
Differential Revision: https://reviews.freebsd.org/D40254
emulators/virtualbox-ose[-legacy]: rename option MANUAL to DOCS and make it
enabled by default
PR: 266992
Approved by: arrowd (mentor)
Differential Revision: https://reviews.freebsd.org/D40118
emulators/virtualbox-ose[-legacy]: VM VirtualBox Manager: Help menu: unable to
open external browser
While here sort out LOCALBASE, PREFIX, VBOX_DIR, VBOX_ETC
PR: 266778
Approved by: arrowd (mentor)
Differential Revision: https://reviews.freebsd.org/D40119
emulators/virtualbox-ose: fix builds on CURRENT
SAVENAME was retired by D36542 https://reviews.freebsd.org/D36542
Bug 267079 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=267079
involves failures to build four ports, for VirtualBox guest additions,
on FreeBSD-CURRENT:
emulators/virtualbox-ose-additions
emulators/virtualbox-ose-additions-legacy
emulators/virtualbox-ose-additions-nox11
emulators/virtualbox-ose-additions-nox11-legacy
Fix bug 267079 for CURRENT 1400068 and greater by hiding the use of
SAVENAME in patch-src_VBox_Additions_freebsd_vboxvfs_vboxvfs__vnops.c
for:
emulators/virtualbox-ose
emulators/virtualbox-ose-legacy
PR: : 267079
Author: : mjg
Approved by: : ports-committers (lwhsu), khng
Differential revision: https://reviews.freebsd.org/D37074
Mk/**tex.mk: Convert bsd.tex.mk to USES=tex
- Update all the consumers to use USES=tex
- USE_TEX=yes is the old way of writing USES=tex which has been removed
and replaced in all ports
- Almost all of the USE_TEX features remains unchanged
- Some consumers had the same variables defined both in the mk
infrastructure and also in the ports which have been removed from the
ports as those are redundant.
In case any of the consumers are failing to build please make sure that
the nexessary USES=tex is there. Unlike previous USE_TEX=yes will no
longer load the required VARS for tex and related dependencies.
Reviewed by: portmgr
Approved by: portmgr (blanket)
Mk/Uses: always use colon for build/run suffix
Most USES use a colon for build/run(/test) suffixes. Change kde.mk,
qt.mk and pyqt.mk to do the same, and update all ports using that.
Document in CHANGES.
PR: 266034
Exp-run by: antoine
Approved by: tcberner (mentor)
Differential Revision: https://reviews.freebsd.org/D36349
Remove WWW entries moved into port Makefiles
Commit b7f05445c00f has added WWW entries to port Makefiles based on
WWW: lines in pkg-descr files.
This commit removes the WWW: lines of moved-over URLs from these
pkg-descr files.
Approved by: portmgr (tcberner)
Add WWW entries to port Makefiles
It has been common practice to have one or more URLs at the end of the
ports' pkg-descr files, one per line and prefixed with "WWW:". These
URLs should point at a project website or other relevant resources.
Access to these URLs required processing of the pkg-descr files, and
they have often become stale over time. If more than one such URL was
present in a pkg-descr file, only the first one was tarnsfered into
the port INDEX, but for many ports only the last line did contain the
port specific URL to further information.
There have been several proposals to make a project URL available as
a macro in the ports' Makefiles, over time.
(Only the first 15 lines of the commit message are shown above )
emulators/virtualbox-ose: Add VBoxSharedClipboard.so to non X11 builds
This library is built when X11 is disabled too, since the functionality
can also be used by remote protocols.
PR: 261729
MFH: 2022Q3
emulators/virtualbox-ose-kmod*: Tie to a specific release branch.
Use a more restricted range of supported __FreeBSD_version values for
the virtualbox kernel module since it uses internal KPIs for which KBI
stability is not guaranteed. DECLARE_MODULE_TIED would tie the module
to a specific __FreeBSD_version which would cause the module to stop
loading when an SA or EN is pushed on a release branch. Instead, use
DECLARE_MODULE_MAXVER with an upper bound that is limited to the range
of a releng branch so that a module built on X.Y will load on X.Y with
SAs or ENs applied but will fail to load on X.Y-1 or X.Y+1.
Reviewed by: kevans, imp, madpilot, lwhsu (earlier version)
Differential Revision: https://reviews.freebsd.org/D16119
textproc/libxml2: bump all LIB_DEPENDS consumers
This is a separate commit to facilitate easier cherry-picking for
quarterly.
PR: 262853, 262940, 262877, 263126
Approved by: fluffy (mentor)
textproc/libxml2: bump all dependencies
This should make sure that all dependent ports will pick
up the new version commited with a13ec21cd733f67a9fc0dc00ab45268bdc236246
emulators/virtualbox-ose: Put vbox/networks.conf in the right place
Since virtualbox-ose 6.1.26 a new networks.conf file has been
introduced and the software looks for it in /etc/vbox.
This commit introduces a patch to make virtualbox look for it in
PREFIX/etc/vbox.
To help users with configurations already using this file in /etc/vbox
notes to UPDATING, pkg-message and to the main virtualbox executable
script have been added.
Also adding some comments to the Makefile to note that QA warning
due to reinplace being run but not having changed any file are
expected due to the design of this port Makefile.
PR: 261522
emulators/virtualbox-ose(-legacy): Take advantage of ccache
This patch teaches the virtualbox ports to take advantage of ccache
if the ports are configured to use it.
PR: 254616
emulators/virtualbox-ose-additions(-legacy): Fix build on recent head
On recent head, after src commit 66c5fbca7719dc, the insmntque1(9)
function arguments changed.
Adapt virtualbox code, following what has been done in base with
other filesystems migrating to insmntque(9).
*/*: Remove redundant '-[0-9]*' from CONFLICTS_INSTALL
The conflict checks compare the patterns first against the package
names without version (as reported by "pkg query "%n"), then - if
there was no match - agsinst the full package names including the
version (as reported by "pkg query "%n-%v").
Approved by: portmgr (blanket)
emulators/virtualbox-ose: Fix unintentional change
AAn unintentional change slipped in a previous commit. Revert that
part.
No change in the produced packages.
Fixes: 32c43c50524246
emulators/virtualbox-ose*: Fix mistake in patch
In the commit to update virtualbox-ose to 6.1.28 I made a one line
mistake when reapplying a patch which failed to apply as is.
In the patch
files/patch-src_VBox_HostDrivers_Support_freebsd_SUPDrv-freebsd.c
I did not replay a part removing the line:
rc = copyout(pHdr, pvUser, cbOut);
which was rewriting some data that it should not. The correct code
was anyway present after this leftover statement.
This error made virtualbox log a lot of warnings about Bad CPU
context like this:
vboxdrv: Bad CPU context error at line 373 in SUPDrv-freebsd.c:
ulCmd=0x2000568a: 0x282->0x287!
These seem to be unharmful, but anyway indicate a problem that this
commit fixes.
Reported by: Kevin Oberman <rkoberman@gmail.com> (via mailing list)
Fixes: a3db7da59f9498
emulators/virtualbox-ose: Update description and message files
- Add updated information about supported versions, installation
commands and mitigation for a known issue.
- Removed reference to the wiki page.
Reviewed on github:
https://github.com/freebsd/freebsd-ports/pull/115
PR: 254412