Everytime I upgrade my kernel on Arch Linux, VirtualBox stops working, and everytime, I can’t remember the command to rebuild it.

So I am copying here how to do it, so I can come and read it.

---------------------------------------------------------------------------
 IMPORTANT NOTES:

- Run "vbox_build_module" as root every time your kernel is upgraded, to
  compile the module for the new kernel version.
- Add your user to the vboxusers group:
     gpasswd -a USERNAME vboxusers
- Add "vboxdrv" to the MODULES array in your "/etc/rc.conf"
- Add "vboxnetflt" to MODULES if you want Host Interface networking.
- Add "vboxnetadp" to MODULES if you want Host-Only networking.
- If USB does not work for you out-of-the-box, add the following line
  to "/etc/fstab":
     none /proc/bus/usb usbfs auto,busgid=108,busmode=0775,devgid=108,devmode=0664 0 0
---------------------------------------------------------------------------

Hope this may also be useful for anyone finding it on google.

More notes, from the newer versions

:: Recompiling VirtualBox kernel modules    [BUSY]    [DONE] 

==> You must load vboxdrv module before starting VirtualBox:
==> # modprobe vboxdrv
==>
==> You must load vboxnetflt for Host Interface Networking:
==> # modprobe vboxnetflt
==>
==> You must load vboxnetadp for Host-Only networking:
==> # modprobe vboxnetadp
==>
==> To load it automatically, add vboxdrv module to the "MODULES" array
==> "/etc/rc.conf".
==>
==> Run `/etc/rc.d/vboxdrv setup` as root every time your kernel is
==> upgraded, to compile the module for the new kernel version.
==>
==> If USB does not work for you out-of-the-box, add the following line
==> to "/etc/fstab":
==> "none /proc/bus/usb usbfs auto,busgid=108,busmode=0775,devgid=108,devmode=0664 0 0"