Running Vagrant on OpenSUSE

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

tsao@mylaptop :~> sudo rpm -Uvh

tsao@mylaptop :~> sudo rpm -Uvh

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
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.