Install Virtualbox on a Chromebook

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!

18 thoughts on “Install Virtualbox on a Chromebook”

  1. Hey can I just confirm you have done this on a Chromeboox Pixle 2015 and installed OVB.. Which distribution did you then pick from the Downlaods page ?

    So want to switch from my macbook but cant try any of this as all dealers by me do not have demo units , strictly mail order

    1. Yes I can confirm I have this running on my Chromebook Pixel 2015 LS. I installed oracle virtualbox from their page. I downloaded the 64bit debian/ubuntu version (.deb format.) It’s pretty sweet.

  2. Hi Nicholas, I follow your steps but I always get the message “Kernel driver not installed (rc=-1908”. I’m running ubuntu trusty with crouton on a C300 ASUS chromebook. Can you help me on this please ?

    1. Hi Dany, I no longer run virtualbox in crouton in this fashion, so I can’t help you troubleshoot. In the past I’ve had to run both scripts multiple times to get it to work. Also make sure you’re running the right scripts in the right context (one run in chromeOS, the other in the chroot.)

    1. crosh is the shell on your chromebook. It’s where you issue commands for the chromebook itself. A chroot is a separate Linux environment which is different than the shell environment on your chromebook. It’s in a chroot where you can install Linux distribution software like Ubuntu. You use a crosh shell to get into a chroot.

  3. this didnt work for me.. rm: cannot remove ‘./tmp_dist’: No such file or directory
    Your kernel version 4.4.153-15155-g656ec00c3ce2 with architecture amd64 is not supported

    help..

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.