Friday, August 9, 2013

Setting up Vagrant on Fedora 17

Vagrant claims it can help in setup of virtual environments and make it easy to setup new guests.

However, to play around with that, I need to have Vagrant itself installed.

As I'm on Fedora 17, I went for this guide going through:
  • VirtualBox installation
  • Vagrant installation and sample usage

VirtualBox installation

[FAILED] Plan A (installing the RPMFusion package)

This was supposed to be be easy.
  • Searching for exact package name first
  • sudo yum list virtualbox
  • Installing afterwards
  • sudo yum install VirtualBox
After the expected problem (as documented by site I followed):
VBoxManage --version
WARNING: The vboxdrv kernel module is not loaded. Either there is no module
         available for the current kernel (3.9.10-100.fc17.x86_64) or it failed to
         load. Reboot the computer or load the kernel module by executing

           '/etc/sysconfig/modules/VirtualBox.modules' (as root)

         You will not be able to start VMs until this problem is fixed.
I was not able to resolve it as suggested, with (as I faced other errors):
sudo /etc/sysconfig/modules/VirtualBox.modules
[sudo] password for pb: 
ERROR: Module vboxdrv not found.
ERROR: Module vboxnetflt not found.
ERROR: Module vboxnetadp not found.
OK, well, time to look elsewhere. I found problem similar to my at virtualbox forum, with the reference, that I should go for the official rather than rpmfusion version of the VirtualBox.

As suggested, I did the removal and installation using:
sudo yum remove VirtualBox

[OK] Plan B (installing the official VirtualBox package)

For this one I've found guide here and it worked smoothly. I've decided not to copy paste information present elsewhere I'm reffering to, so feel free to follow the steps and get back here when done. Except that I didn't follow all the steps, but rather once comming to originally failed step:
$ sudo /etc/init.d/vboxdrv setup                                                                                        
[sudo] password for pb: 
Stopping VirtualBox kernel modules                         [  OK  ]
Uninstalling old VirtualBox DKMS kernel modules            [  OK  ]
Trying to register the VirtualBox kernel modules using DKMS[  OK  ]
Starting VirtualBox kernel modules                         [  OK  ]

$ VBoxManage --version
I was done with that (didn't go for separate VirtualBox user setup).

Vagrant installation and sample usage

Let me reffer to original steps I followed, as the rest went smoothly for me.

Afterwards I could establish ssh connection to guest, simply via:
vagrant ssh

No comments: