Using Vagrant with libvirt
Vagrant is a framework to quickly spin up and manage virtual machines and is very popular within development communities. While Vagrant uses Oracle VirtualBox as the hypervisor by default, we can install a libvirt plugin to use Vagrant with libvirt, benefiting from the sVirt security offered by SELinux.
Deploying Vagrant and the libvirt plugin
The Vagrant application can be installed from a single RPM file. Find the latest version at https://www.vagrantup.com/downloads.html and install it. For instance, for CentOS systems, you can use yum
directly:
# yum install https://releases.hashicorp.com/vagrant/2.2.9/vagrant_2.2.9_x86_64.rpm
To install the libvirt plugin, we first need to make sure that the dependencies are installed as well. The documentation, online at https://github.com/vagrant-libvirt/vagrant-libvirt, gives a good overview of which packages need to be installed. Do not forget this step, as dependency failures during the plugin installation...