The most important part of this installation starts here:
https://docs.freebsd.org/en/books/handbook/virtualization/#virtualization-host-virtualbox
Here is my copied guide.
VirtualBox is available as a FreeBSD package or port in emulators/virtualbox-ose.
The port can be installed using these commands:
# cd /usr/ports/emulators/virtualbox-ose
# make install clean
One useful option in the port’s configuration menu is the GuestAdditions suite of programs. These provide a number of useful features in guest operating systems, like mouse pointer integration (allowing the mouse to be shared between host and guest without the need to press a special
keyboard shortcut to switch) and faster video rendering, especially in Windows® guests. The guest additions are available in the Devices menu, after the installation of the guest is finished.
Configuration changes are needed before VirtualBox is started for the first time. The port installs a kernel module in /boot/modules which must be loaded into the running kernel:
# kldload vboxdrv
To ensure the module is always loaded after a reboot, add this line to
/boot/loader.conf:
vboxdrv_load="YES"
To use the kernel modules that allow bridged or host-only networking,
add this line to /etc/rc.conf and reboot the computer:
vboxnet_enable="YES"
The vboxusers group is created during installation of VirtualBox. All users that need access to VirtualBox will have to be added as members of this group. pw can be used to add new members:
# pw groupmod vboxusers -m yourusername
To make this permissions change permanent, add these lines to
# /etc/devfs.conf
own vboxnetctl root:vboxusers
perm vboxnetctl 0660
For more information on configuring and using VirtualBox, refer to the official website. For FreeBSD-specific information and troubleshooting instructions, refer to the relevant page in the FreeBSD wiki.
22.6.2. VirtualBox USB Support
VirtualBox can be configured to pass USB devices through to the guest operating system. The host controller of the OSE version is limited to emulating USB 1.1 devices until the extension pack supporting USB 2.0 and 3.0 devices becomes available on FreeBSD.
For VirtualBox to be aware of USB devices attached to the machine, the user needs to be a member of the operator group.
# pw groupmod operator -m yourusername
Then, add the following to /etc/devfs.rules, or create this file if it does not exist yet:
# /etc/devfs
[system=10]
add path 'usb/*' mode 0660 group operator
To load these new rules, add the following to
# /etc/rc.conf
devfs_system_ruleset="system"
Then, restart devfs OR reboot:
# service devfs restart
Restart the login session and VirtualBox for these changes to take effect, and create USB filters as necessary.
22.6.3. VirtualBox Host DVD/CD Access
Access to the host DVD/CD drives from guests is achieved through the sharing of the physical drives. Within VirtualBox, this is set up from the Storage window in the Settings of the virtual machine. If needed, create an empty IDECD/DVD device first. Then choose the Host Drive from the popup menu for the virtual CD/DVD drive selection. A checkbox labeled Passthrough will appear. This allows the virtual machine to use the hardware directly. For example, audio CDs or the burner will only function if this option is selected.
HAL needs to run for VirtualBox DVD/CD functions to work, so enable it in /etc/rc.conf and start it if it is not already running:
[this was done during the FBSD installation, but check any ways]
# /etc/rc.conf
hald_enable="YES"
# service hald start
In order for users to be able to use VirtualBox DVD/CD functions, they need access to /dev/xpt0, /dev/cdN, and /dev/passN. This is usually achieved by making the user a member of operator. Permissions to these devices have to be corrected by adding these lines to /etc/devfs.conf:
# /etc/devfs.conf
perm cd* 0660
perm xpt0 0660
perm pass* 0660
# service devfs restart
REBOOT & THEN RUN THE FOLLOWING:
The default permissions for /dev/vboxnetctl are restrictive and need
to be changed for bridged networking:
# chown root:vboxusers /dev/vboxnetctl
# chmod 0660 /dev/vboxnetctl
Thanks for watching! Still Archin' On!!!
Тэги:
#install #oracle #virtualbox #how_to #freebsd #arch #life #home #linux #journey