"No usable default provider could be found for your system" with VirtualBox - vagrant

When trying to init a Vagrant box with VirtualBox, I keep getting this error:
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.
After some searching it seems that Vagrant has compability issues with particular versions of VirtualBox. I'm running Vagrant 2.0 together with VirtualBox 5.2 on MacOS High Sierra. Is this simply not possible, or is there a workaround?
Update: It is a compatibility issue between Vagrant and VirtualBox – tried installing VirtualBox 5.1.14 instead and it works with Vagrant 2.0.

You can also use it with VirtualBox 5.2 with this patch:
https://gist.github.com/roktas/ec34960d2e5d74c3cc4f35bc78bc676d

Related

Does "Vagrant package" command work in vmware fusion?

I have VMWARE fusion on my macbook pro. In that I have a VM ,which was generated using vagrant. This VM has some changes and I want to create a .box file of out this VM.
I did see the post for the same in this forum. But did not find correct one.
I tried vagrant package but it is not working. I got the following error
The "package" command is not supported with VMware. We recommend
taking a look at Packer (www.packer.io) as an option for creating
VMware images
Can anyone throw some light on the same?
vagrant package currently works only for virtualbox VM as said from doc
This packages a currently running VirtualBox environment into a re-usable box. This command can only be used with other providers based on the provider implementation and if the provider supports it. A future version of Vagrant will address packaging boxes for other providers. Until then, they must be made by hand.

What vagrant really is

I'm puzzled by vagrant because I can't understand what it really is.
As we all know, if we want to run another system in our current system, we must install virtualbox and the mirror of that system such as CentOS.
When I installed vagrant it required virtualbox, so it can't be another virtualbox.
I thought it may be a system management just like bower but the vagrant box homestead which contains mysql, nginx, redis, php and memcache is just over 600M which is less than the smallest Linux system..
So I'm very confused. Could you tell me what the vagrant really is?
From the Vagrant website:
Vagrant is a tool for building complete development environments. With an easy-to-use workflow and focus on automation, Vagrant lowers development environment setup time, increases development/production parity, and makes the "works on my machine" excuse a relic of the past.
Basically Vagrant allows you to easily set up a virtual development environment. Everybody can build and configure pre-packaged environments called boxes and publish them for others to use. One of those boxes being homestead.
Here's an article that explains it more in-depth: What is Vagrant and Why should I care?
From the Vagrant website
Create and configure lightweight, reproducible, and portable development environments.
Instead of just installing your software requirements, Vagrant installs a whole development environment with similar hardware and software setup. So you never have to bother with your software not working on some other hardware during development.

Vagrant: dealing with requirements for a particular version of Ruby etc?

I am installing a Vagrant machine from a client.
It says that it needs a particular version of Vagrant, Virtualbox, and Ruby, all of which are different from the particular versions of Vagrant, Virtualbox and Ruby required to run another vagrant machine from another client.
What can I do about this?
I would like to be able to run both VMs on my machine, but it's going to be very difficult if I have to install different versions of Vagrant/Virtualbox/Ruby each time I want to spin the VM up.
Best Option: Work with your clients to make each Vagrant project compatible with the latest versions of each tool. For Vagrant at least, I don't know of too many compatibility issues from version to version, as long as the Vagrantfile is written to be somewhat "future proof". The key to Vagrant is the controlled version environment inside the virtual machine. That's the key benefit which lets these environments be shared among developers and on different platforms.
Alternative: Different Ruby versions is pretty easy with RVM. Different Vagrant/Virtualbox versions would be much trickier, but you might be able to install multiple versions and then wrap everything with some scripts. Vagrant under the hood calls the Virtualbox command-line utilities like VBoxManage, so it would just need to know where those are.

VirtualBox: "Warning: Connection timeout" when trying to run Laravel Homestead VM or x64 VMs

Trying to solve my problem I did the next:
Added 'Ubuntu_64' to config file.
Switched my WiFi off (saw this solution at Laravel forums) before 'vagrant up' execution.
Enabled GUI.
Rolled the VirtualBox and its extension back (also from Laravel forums).
The VMs which were successfully run with Vagrant are the Debian Wheezy 7.5 x32 built with puphpet and precise32.
As we can see, only x32 VMs could be run on my machine. I don't know why.
Here is my machine info:
OS: Ubuntu 12.04 64
Processor: AMD A8-4500M, 2 cores
Virtualization is enabled in BIOS. See screenshot similar to my BIOS view: screenshot
The latest Vagrant, VirtualBox and VirtualBox Extensions pack are installed
my user is added to virtualbox group
Thanks in advance.
Dude, your question helped me to fix my problem!
I was getting this connection timeout, turned my wifi off and bam! All working fine!
Double check if your ubuntu is really 64 bit.
I got some problems with some linux architectures for AMD in the pest!
There are a few and sometimes they can be a headache.. I think I got this problem with centos, it was i686 instead of simple x64. I don't really know the difference but what you can try doing is:
Instead of adding the homestead box (vagrant box add laravel/homestead)
Why dont you try adding a simple ubuntu-32 machine and then you run vagrant up.
I dont really know if it's going to work, but it's worth trying!
Thanks again for your answer, it really helped me

Vagrant Errors after Windows 8.1 update

After a recent update of my OS from Windows 8 to Windows 8.1 my vagrant setup has stopped working.
I try running vagrant up on boxes and I get the following:
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
[default] Booting VM...
[default] Waiting for machine to boot. This may take a few minutes...
The guest machine entered an invalid state while waiting for it to boot Valid states are 'starting, running'. The machine is in the 'poweroff' state. Please verify everything is configured properly and try again.
I've tried updating vagrant. I've updated VirtualBox to 4.3. I've tried specifically setting VirtualBox to run as Administrator and in compatibility mode for Windows 8. That didn't work. Also tried compatibility mode for Windows 7. No dice.
Anyone else having these problems? Windows 8.1 is to new to find reports of this through Google searching. hopefully someone here can help out.
So, here is how I actually managed to fix it.
The newest versions of Vagrant (1.3.5) and VirtualBox (4.3.4) do not play together at all on Windows. So, I kept Vagrant 1.3.5 and went down to VirtualBox 4.2.2.
Once you have that, you have to get rid of a couple folders so that everything resets itself correctly:
Users\<<USERNAME>>\.VirtualBox
Users\<<USERNAME>>\.vagrant.d
Delete those before trying to run
vagrant up
With that, I was able to get everything running again. However, I have noticed that running vagrant up does go a tad slower than it had been previously. I can live with that though.
Thank you for all of your help and suggestions.
Ran into this problem and figured out the problem. Turns out I did not have the proper virtualization settings enabled in my bios.
Vagrant emitted a helpful error:
If the provider you're using has a GUI that comes with it, it is often
helpful to open that and watch the machine, since the GUI often has
more helpful error messages than Vagrant can retrieve.
For example, if you're using VirtualBox, run vagrant up while the
VirtualBox GUI is open.
Followed the instructions and tried to power on the vm via the GUI and was greeted with this error:
Was able to vagrant up after turning on the proper settings in my bios.
OS: Windows 8.1, Vagrant version: 1.3.5, Virtual Box version: 4.3.4
opening VirtualBox GUI may give you a better idea of what's going on. 4.3 has been recently released, so if you've updated, your issue may be related to that
Running Vagrant on Windows 8.1 has caused Windows 8.1 to reboot shortly after a vagrant up for me. I am able to recreate this every time.

Resources