14

Set Default Vagrant Provider to Virtualbox on Linux; Fedora,Debian,Ubuntu

 2 years ago
source link: https://computingforgeeks.com/how-to-set-default-vagrant-provider-to-virtualbox-on-linux/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
Set Default Vagrant Provider to Virtualbox on Linux; Fedora,Debian,Ubuntu

I have been using Vagrant to manage my Virtual Machines for a long time now. Vagrant provides you with such cool Virtual Machines control system. While trying to create a virtual machine on my Fedora Distribution, I got an error message “the provider ‘libvirt’ could not be found, but was requested to back the machine ‘default’. Please use a provider that exists”. After speding some minutes on Google, I found a simple solution that works.

By default, VirtualBox is the default provider for Vagrant. if you had changed the default provider, this guide will show you how to restore VirtualBox as the default provider. VirtualBox provides the lowest friction for new users to get started with Vagrant.

Using KVM

If you would like to use vagrant with KVM, make sure you install libvirt packages for vagrant. See examples below on installations:

#Fedora
sudo dnf install -y vagrant-libvirt vagrant

It is much easier to specify the default provider in Vagrant by setting the VAGRANT_DEFAULT_PROVIDER environmental variable.

echo "export VAGRANT_DEFAULT_PROVIDER=virtualbox" >> ~/.bashrc
source ~/.bashrc

You only need to set VAGRANT_DEFAULT_PROVIDER to the provider you wish to be the default. For other providers values set are as below:

  • VMware: vmware_desktop
  • Docker: docker
  • Hyper-V: hyperv

Check out more guides available on Vagrant:


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK