VirtualBox - Arch Linux Wiki Page
https://wiki.archlinux.org/title/VirtualBox
Install the virtualbox package. You will also need to choose a package to provide host modules:
Check your current kernel
$ uname -r
6.15.8-arch1-2
If your kernel is Arch, choose virtualbox-host-modules-arch
.
If your kernel is linux-lts kernel, choose virtualbox-host-modules-lts
If your kernel is other kernel, choose virtualbox-host-dkms
For the standard Arch kernel (linux):
sudo pacman -S virtualbox virtualbox-host-modules-arch
Load the VirtualBox Kernel Modules after install.
After the packages are reinstalled, you need to load the kernel modules. The simplest way to ensure they are all loaded is to reboot your system.
sudo reboot
If needed to Load the VirtualBox kernel modules
virtualbox-host-modules-arch and virtualbox-host-dkms use systemd-modules-load.service to load VirtualBox modules automatically at boot time.
To load the module manually, run in root
mode:
sudo modprobe vboxdrv
modprobe vboxdrv
is the command to load the module. It's quiet when it works.
Type this command lsmod
to check if module is loaded.
lsmod | grep vboxdrv
Success: If the module is loaded, you will see output like this:
vboxdrv 516096 3 vboxnetflt,vboxnetadp