I am really enjoying my Chromebook Pixel 2015. Recently I needed to spin up a few VMs on this box. I tried to install virtualbox but it turns out that the kernel for the chromebook does not include virtualbox headers. Fortunately it’s fairly easy to add them, thanks to divx118’s scripts.
First, enable the necessary chromebook kernel flags. Run these commands in a crosh shell (not in a chroot)
cd ~/Downloads
wget https://raw.githubusercontent.com/divx118/crouton-packages/master/change-kernel-flags
sudo sh ~/Downloads/change-kernel-flags
Note: You will need to repeat the above steps after each chromeos update.
Next, open up a chroot shell and do the following:
cd ~
wget https://raw.githubusercontent.com/divx118/crouton-packages/master/setup-headers.sh
sudo sh setup-headers.sh
Lastly, reboot the chromebook. Once you’re back up, enter your chrooted environment and install Virtualbox from their Oracle’s download page. Don’t use the virtualbox repositories – they don’t work.
Install the downloaded deb file with dpkg
dpkg -i virtualbox-5.0_5.0.10-104061~Ubuntu~trusty_amd64.deb
You might get this error:
dpkg: dependency problems prevent configuration of virtualbox-5.0: virtualbox-5.0 depends on libqt4-opengl (>= 4:4.7.2); however: Package libqt4-opengl is not installed.
The fix to that error is to run the following command to install missing dependencies:
apt-get -f install
If you get weird errors about VT-X not being enabled in the BIOS, try running the script and rebooting again.
Success!