VirtualBox in ArchLinux

I’d like to say I always minimize my working on the local / host system (ArchLinux) for several security- and working purpopes. The best thing is to use software like VirtualBox or VMware, I prefer the first.

But now, how should you install VirtualBox in ArchLinux? It’s not that hard but it might be kernel dependable whether it works (or not). Firstly we are going to install VirtualBox with the precompiled modules for the stock ArchLinux kernel:

1
#sudo pacman -S virtualbox virtualbox-host-modules qt4  virtualbox-guest-iso

With any problems you should be able to run VirtualBox now, but what if you can’t and you know you have a linux-lts kernel? Run the following:

1
#sudo pacman -S virtualbox-host-modules-lts

For any other custom kernel(s) first install this:

1
#sudo pacman -S virtualbox-host-dkms

When ready you can generate the kernel modules for your custom kernel by:

1
# sudo dkms install vboxhost/$(pacman -Q virtualbox|awk {'print $2'}|sed 's/\-.\+//') -k $(uname -rm|sed 's/\ /\//')

We’ll need the modules automatically to be loaded at startup by enabling the dkms service:

1
# sudo systemctl enable dkms.service

The last thing to do is enabling the driver at startup:

1
# sudo nano /etc/modules-load.d/virtualbox.conf

Enter:

vboxdrv

Now start VirtualBox by command:

1
# virtualbox

Comments