0

I have tried installing latest versions of VirtualBox and Vagrant, but I keep receiving the error message below when trying to run vagrant. How can I find the problem and correct it?

No usable default provider could be found for your system.

Vagrant relies on interactions with 3rd party systems, known as
"providers", to provide Vagrant with resources to run development
environments. Examples are VirtualBox, VMware, Hyper-V.

The easiest solution to this message is to install VirtualBox, which
is available for free on all major platforms.

If you believe you already have a provider available, make sure it
is properly installed and configured. You can see more details about
why a particular provider isn't working by forcing usage with
`vagrant up --provider=PROVIDER`, which should give you a more specific
error message for that particular provider.

President James K. Polk
  • 40,516
  • 21
  • 95
  • 125
  • "You can see more details about why a particular provider isn't working by forcing usage with `vagrant up --provider=PROVIDER`, which should give you a more specific error message for that particular provider.", I'm assuming you've done this? – Matthew Nov 16 '21 at 19:25
  • Thank you for your swift response. I have done that. And receive the following error. /* vagrant up --provider=virtualbox 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: VirtualBox is complaining that the kernel module is not loaded. Please run `VBoxManage --version` or open the VirtualBox GUI to see the error message which should contain instructions on how to fix this error. */ – Trigun Joshi Nov 16 '21 at 21:12
  • After this, I run the VBoxManage and receive the following error. – Trigun Joshi Nov 16 '21 at 21:31
  • Does this answer your question? [Unable to vagrant up - how to set "providers"](https://stackoverflow.com/questions/29450437/unable-to-vagrant-up-how-to-set-providers) – Bracken Nov 24 '21 at 17:30

1 Answers1

0

Be sure to install VirtualBox first, since Vagrant depends on it.

-Download and install VirtualBox

-Download and install Vagrant

-Adjust VirtualBox and Vagrant

The next step is to make some tweaks to VirtualBox and Vagrant. We need to do this because, by default, both tools store data in the same drive where they were installed (tipically the C drive). The thing with virtual machines is they can take up a lot of space, so they can eat up your main drive’s storage very quickly.

First we’ll change the storage path in Virtual Box, since it’s pretty straightforward. You now should have a program called Oracle VM VirtualBox installed. Open it and then go to File > Preferences. A new dialog will open where you can change the folder next to the option that reads Default Machine Folder. Click the dropdown and choose Other…. Here you can choose the new folder for VirtualBox to store data.

Now we’ll do the same for Vagrant.

By default the path where data related to virtual machines is stored is C:\Users\YourUser\.vagrant.d so I recommend changing it to a different drive. This can be done with environment variables. We need to create a variable called VAGRANT_HOME and point it to our desired location.

Open the control panel and search for the word environment. From the results choose the one that says edit environment variables for your account. On the new dialog that appears, click the New… button. Here you will create the new variable. Enter VAGRANT_HOME as the value for the field named Variable name. For the field named Variable value enter the path of your choice. In my case I used C:\VM\Vagrant

Tinxuanna
  • 206
  • 1
  • 3
  • 16