I would like to use a virtual box with Vagrant using KVM and libvirt on my Fedora 25 system. This has worked already with Fedora 24. When I try to start the machine, it seems to ignore the --provider libvirt flag and still uses VirtualBox:

$ vagrant up --provider libvirt
The provider 'virtualbox' that was requested to back the machine
'default' is reporting that it isn't usable on this system. The
reason is shown below:

Vagrant could not detect VirtualBox! Make sure VirtualBox is properly installed.
Vagrant uses the `VBoxManage` binary that ships with VirtualBox, and requires
this to be available on the PATH. If VirtualBox is installed, please find the
`VBoxManage` binary and add it to the PATH environmental variable.

How can I get it to use KVM?

My Vagrantfile is just this:

Vagrant.configure(2) do |config|
  config.vm.box = "ubuntu/xenial64"

  config.vm.provision "shell", inline: <<-SHELL
    sudo apt-get update
    sudo apt-get install devscripts

Could you post your vagrantfile ? My first guess would be that the config file is explicitly specifying Virtualbox as the provider something like that: ' config.vm.provider :virtualbox'


The problem is in the things I did not say: I have used VirtualBox in the past for this project. Therefore in the .vagrant folder, there are some remnants from that. Now Vagrant correctly uses that last provider that I have used and will not change because the state in the machine would be lost.

Removing the .vagrant folder did the correct thing, Vagrant tried to download the virtual machine image for libvirt. However, there seem to be no more libvirt images on the Atlas, therefore one needs to use the mutate plugin to convert it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.