Autoupdate VirtualBox Guest Additions in Vagrant > stdout.in Ievgen Kuzminov IT blog

Autoupdate VirtualBox Guest Additions in Vagrant

Dec 26, 2013, 7:39:03 PM

vagrant

While using Vagrant (I'll leave the question "Why should I use it?" for some future post) and taking ready made Boxes from http://vagrantbox.es - the fist issue I have faced was a warning about inconsistency of VirtualBox Guest Additions and actual VirtualBox version I am using.

Why is this happening ?

Because VirtualBox Guest Additions - it is drivers etc. installed inside the Box (that you are downloading somewhere) and for each new VirtualBox version new Guest Additions are required.
It can work with old version in general, but very essential parts could fail - like shared folders etc.

How to fix it manually

You could go to VirtualBox downloads server and find yourself needed ISO, download it inside Vagrant box via wget for example, mount it and install. But it is boring :)

Autoupdate Guest Additions via Vagrant plugin

vagrant-vbguest comes to help us with it.

Install

vagrant plugin install vagrant-vbguest

Configure

Add one line in your Vagrantfile

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
...
  config.vbguest.auto_update = true
...
end

and restart Vagrant box vagrant up

If you are lucky - everything else will happens automatically and you will be notified about version of Guest Additions that is being installed.

Also go through Configuration docs for vbguest to see other useful params.

comments powered by Disqus
Ievgen
Kuzminov "iJackUA"
Web Team Lead
at MobiDev (Kharkiv, Ukraine)
Code in Ruby and Elixir, but still love PHP. Explore ES6 and Vue.js. Explore databases, use Ubuntu and MacOS, think about IT people and management

Notes


Linkify - jQuery plugin for finding URLs in plain-text and converting them to HTML links. It works with all valid URLs and email addresses



Remodal - flat, responsive, lightweight, fast, easy customizable modal window jquery plugin with declarative state notation and hash tracking



Giving a try to Ubuntu 14.04 - so far it's ok. More stable and refined. But it seem to have problems with Cinnamon 2 installation. Oh fine... will wait for Linux MInt 17 to use on my Work machine



Updated blog. Mostly "under-the-hood" changes according to latest Yii2 state, some CSS and server optimisations. In case of any issues please feel free to comment here