1. Install the basic package
sudo pacman -S virtualbox
Select the virtualbox-host-modules-arch module
sudo pacman -S virtualbox-guest-iso
2. Load the VirtualBox kernel module
sudo modprobe vboxdrv vboxnetadp vboxnetflt
vboxdrv
Driver module vboxnetadp
bridge network vboxnetflt
host-only network vboxpci
: If you want the virtual machine to use the PCI device of the main machine, then this module is required.
3. Install the extension pack
yay -S virtualbox-ext-oracle
4. Add the current user group to vboxusers
sudo usermod -G vboxusers -a 用户名