Skip to content

Instantly share code, notes, and snippets.

@juandebravo
Created January 10, 2016 00:56
Show Gist options
  • Save juandebravo/42ab675f3ef66b2682c9 to your computer and use it in GitHub Desktop.
Save juandebravo/42ab675f3ef66b2682c9 to your computer and use it in GitHub Desktop.
Install VirtualBox guest additions
# Steps taken from official documentation:
#
# https://docs.vagrantup.com/v2/virtualbox/boxes.html
#
# If you get this message while launching a Vagrant box:
shell> vagrant up
# ...
#
# Failed to mount folders in Linux guest. This is usually because
# the "vboxsf" file system is not available. Please verify that
# the guest additions are properly installed in the guest and
#
# ...
# Do the following:
shell> vagrant ssh
vagrant> sudo apt-get install build-essential linux-headers-`uname -r` dkms
# Mind the VirtualBox version you're using
vagrant> wget http://download.virtualbox.org/virtualbox/5.0.12/VBoxGuestAdditions_5.0.12.iso
vagrant> sudo mkdir /media/VBoxGuestAdditions
vagrant> sudo mount -o loop,ro VBoxGuestAdditions_5.0.12.iso /media/VBoxGuestAdditions
vagrant> sudo sh /media/VBoxGuestAdditions/VBoxLinuxAdditions.run
vagrant> rm VBoxGuestAdditions_5.0.12.iso
vagrant> sudo umount /media/VBoxGuestAdditions
vagrant> sudo rmdir /media/VBoxGuestAdditions
vagrant> exit
shell> vagrant halt
# Now it should work
shell> vagrant up
# Alternative to be checked out:
# https://github.com/dotless-de/vagrant-vbguest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment