2014-10-14

Setup Vagrant with VirtualBox backend up on Fedora 20

Usually Vagrant with VirtualBox is one of the easiest things of the world. You go to the website of each project, download the corresponding package for your system, install it, run a vagrant up command on your project and your'e done.

I recommend you to stay at this process if you're new to Fedora and you're not sure how to fix issues on your Fedora box. The following article is for advanced users who know what they do and know how to fix (small) issues on their Fedora installation.

My Fedora installations are always a bit… let's say unusual. From my personal point of view they run very stable and I can work with them, but I am a guy who is always doing things which sometimes are not recommended, just to get the latest stuff up and running.

So these were the requirements I had:

* I don't want to manually download an RPM package from a third-party site
* I rather want to install the packages using my preferred package manager (which is currently yum)
* I have enabled the updates-testing repositories for Fedora and RPMFusion
* I have installed the latest kernel from the RawhideKernelNodebug repository
* I'm surely not going to downgrade my kernel just to get VirtualBox or Vagrant working
* This has to work even when I upgrade my kernel

At that constellation I'm running here and I must say it is stable enough to work for me.  If you're interested in how I did this, here is a small check list what you need:

* VirtualBox thankfully is available in RPMFusion, so this is nothing difficult so far, I even received an update to VirtualBox 4.3.18 via rpmfusion-free-updates-testing this morning
* Vagrant is available in Fedora Copr here: http://copr.fedoraproject.org/coprs/jstribny/vagrant-f20/

Having the repositories placed in /etc/yum.repos.d/ and enabled I'm always doing the following steps

yum clean all
yum makecache

And then install the packages:

yum install VirtualBox VirtualBox-kmodsrc akmod-VirtualBox vagrant

At the first vagrant up, I was facing a small issue claiming the installed bundler version doesn't match the required version which needed to be greater or equal 1.5.2 and smaller than 1.7.0. The currently installed version in Fedora was 1.7.3. To fix this I've pointed out the file where this requirement is specified:

/usr/share/gems/specifications/vagrant-1.6.5.gemspec

What I've done now is kind of a "dirty hack" to work around this dependency problem with replacing the requirement to bundler version smaller 1.7.0 to a higher version (in my case 1.8.0). The next vagrant up command was working without any issues and my Vagrant box was up and running.

I of course still have an item on my Todo list to report the issue to jstribny as the Copr maintainer for Vagrant. :-) Jstribny already fixed this issue in an update for the Vagrrant package. Thank you! :-)

Keine Kommentare:

Kommentar veröffentlichen

Hinweis: Nur ein Mitglied dieses Blogs kann Kommentare posten.