Some weeks ago Fedora Magazine published a post about running vagrant in Fedora 22 using the libvirt provider. But if you try to repeat the procedure in OpenSUSE you’ll have to perform some different steps because currently there is not a vagrant package at OpenSUSE (I use 13.2).
So you will:
- install ruby and ruby-devel
tsao@mylaptop :~> sudo zypper in ruby ruby-devel
- download and install the Vagrant package from the project home web.
tsao@mylaptop :~> sudo rpm -Uvh https://dl.bintray.com/mitchellh/vagrant/vagrant_1.7.4_x86_64.rpm
tsao@mylaptop :~> sudo rpm -Uvh https://releases.hashicorp.com/vagrant/1.8.1/vagrant_1.8.1_x86_64.rpm
The most used virtualization provider for Vagrant is VirtualBox, so at this point you can run Virtalbox boxes if you was running VirtualBox vm before.
But, if you want to run libvirt boxes, you will do:
- install some additional packages: qemu, libvirt, libvirt-devel, qemu-kvm
tsao@mylaptop :~> sudo zypper in qemu libvirt libvirt-devel qemu-kvm
- install the libvirt plugin
tsao@mylaptop :~> vagrant plugin install vagrant-libvirt
- enable the the libvirtd daemon:
tsao@mylaptop :~> systemctl enable libvirtd tsao@mylaptop :~> systemctl start libvirtd
- add your user to libvirt group (or you will be asked for your credentials when you run vagrant up):
tsao@mylaptop :~> sudo usermod -a -G libvirt tsao
And, at this point, you can add and run Vagrant-libvirt boxes. Enjoy it :-)
Update, March 4th, 2016: Thanks to George J. Johnson for warning me about some typos.