Skip to content

Instantly share code, notes, and snippets.

@waako
Last active December 24, 2015 20:09
Show Gist options
  • Save waako/6855911 to your computer and use it in GitHub Desktop.
Save waako/6855911 to your computer and use it in GitHub Desktop.
Basics to getting Vagrant running on Ubuntu

source: http://swaeku.github.io/blog/2013/03/09/installing-vagrant-on-ubuntu-12-dot-10/

Why Reproductibe Environments are Essentials

Without a reproductible environment that can be setup rapidly, testing installation or deployment scripts almost always ends up in breaking my working environment and makes me less efficient.

Install Virtualbox

Virtualbox is the virtualization software used by Vagrant:

$ sudo apt-get install virtualbox

Install Vagrant

$ sudo apt-get install vagrant

Unless you've already installed you kernel headers, it shouldn't go without a hitch when executing the post-install scripts:

First Installation: checking all kernels...
Building only for 3.5.0-25-generic
Module build for the currently running kernel was skipped since the
kernel source for this kernel does not seem to be installed.
 * Stopping VirtualBox kernel modules                                   [ OK ] 
 * Starting VirtualBox kernel modules
 * No suitable module for running kernel found                          [fail]
invoke-rc.d: initscript virtualbox, action "restart" failed.

What happens here is that the virtualization technology used by VirtualBox needs specific kernel modules to be loaded, and these kernel modules are not built unless kernel headers are installed.

Install Kernel headers

$ sudo apt-get install linux-headers-$(uname -r)

Reconfigure Virtualbox DKMS

$ sudo dpkg-reconfigure virtualbox-dkms

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment