Vagrant provider stuck to VMWare Workstation - vagrant

After trying to use the VMWare Workstation providers for vagrant (which I now know requires a license), and switching back to VirtualBox, I have this problem :
$ ~/Homestead > vagrant up --provider=virtualbox
A valid license is required to run the Vagrant VMware
provider. Please visit http://www.vagrantup.com to purchase
a license. Once you purchase a license, you can install it
using `vagrant plugin license`.
Vagrant failed to initialize at a very early stage:
The plugins failed to load properly. The error message given is
shown below.
exit
I also tried exporting a default provider through VAGRANT_DEFAULT_PROVIDER, but to no avail.

You dont need the equal (=) sign. just run
vagrant up --provider virtualbox
if you export the VAGRANT_DEFAULT_PROVIDER you can run the command with the option
fhenri#machine:~/project/ubuntu$ export VAGRANT_DEFAULT_PROVIDER=virtualbox
fhenri#machine:~/project/ubuntu$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
Can you uninstall the vmware plugin to see if it has effect
vagrant plugin uninstall vagrant-vmware-fusion
Then run it again
can you confirm you have the same issue with any Vagrantfile ?

Related

How to remove cached non-existing Virtualbox machines, using Hyper-V as provider?

I was using Vagrant under Windows 10 Pro first with Virtualbox provider and created a few boxes. Then because I wanted to test Docker for Win, I had to switch to Hyper V and uninstall Virtualbox. After some time I manually deleted some Virtualbox machines or re-purposed the folders so they don't have Vagrantfile anymore in them.
When I try to run either
vagrant global-status --prune
or
vagrant destroy -f XXXYYYZZZ
I get this error:
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.
I understand what Vagrant is trying to say: Install virtualbox binary so it can manage the boxes. But actually there are no VMs to begin with so it should be enough to delete it from registry and for that no Virtualbox is necessary. Is there a way how to remove cached boxes from registry in my case?
vagrant is keeping the list of machines it manages under the following location (that is for Mac, you would need to find for windows as I am not fully sure about the path)
~/.vagrant.d/data/machine-index
and under this folder, you'll find a index file that will list all machines it has in cache. its a JSon file and the provider for the machine is listed so you can remove anything that is not VirtualBox
I got the similar situation when I try to install Docker on my Windows 10 machine with vagrant + virtual box.
I have uninstalled virtual box, but the same error continues every time I try to run "vagrant up"
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.
So below process saved me from it.
step 1: Add below line in vagrantfile below line "config.vm.box"
config.vm.define "hyperv"
Step 2: start your vagrant box calling like below from powershell or cmd
vagrant up --provider=hyperv
It should work. I got the vagrant running after these steps.
It must be the provider which is saved as virtual box somewhere in cache or registry.enter code here
source: https://willmurphyscode.net/2017/01/16/a-very-simple-vagrant-deployment/

Using Vagrant to set up a VM with KVM/qemu without VirtualBox

I'm getting started Vagrant and want to use it with KVM/qemu (and the Virtual Machine Manager GUI), instead of installing VirtualBox. So I first installed Vagrant:
$ vagrant --version
Vagrant 1.9.1
$ vagrant box list
There are no installed boxes! Use `vagrant box add` to add some
As per these posts, I require vagrant-libvirt for it to work with KVM, so I installed that next:
$ vagrant plugin list
vagrant-libvirt (0.0.37)
vagrant-share (1.1.6, system)
Next, I to add a CentOS(7) box using vagrant box add "centos/7" and selected libvirt, when prompted. After which, I ran vagrant init and didn't encounter any errors:
$ vagrant init centos/7
A `Vagrantfile` has been placed in this directory. You are now
ready to `vagrant up` your first virtual environment! Please read
the comments in the Vagrantfile as well as documentation on
`vagrantup.com` for more information on using Vagrant.
However, vagrant up seems to be erroring out, like so:
$ vagrant up
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.
Here's the provider section in the Vagrantfile
config.vm.provider :libvirt do |domain|
domain.driver = "qemu"
domain.memory = 512
domain.cpus = 1
end
I tried modifying it to:
config.vm.provider :libvirt do |domain|
domain.driver = "kvm"
domain.host = 'localhost'
domain.uri = 'qemu:///system'
domain.memory = 512
domain.cpus = 1
end
I also tried vagrant up --provider=kvm, vagrant up --provider=qemu, and vagrant up --provider=libvirt too, to no avail.
Is there any step that I've missed? Or another package/dependency that needs to be installed?
Edit: After the adding centos/7 using vagrant, it shows up when running vagrant box list.
$ vagrant box list
centos/7 (libvirt, 1611.01)
Start vagrant box with command
vagrant up --provider=kvm
Although it has been said in https://seven.centos.org/2017/08/updated-centos-vagrant-images-available-v1707-01/ that
The vagrant-libvirt plugin is only compatible with Vagrant 1.5 to 1.8
You can use either the command line option --provider=kvm or you can set the VAGRANT_DEFAULT_PROVIDER environment variable:
export VAGRANT_DEFAULT_PROVIDER=kvm # <-- may be in ~/.profile, /etc/profile, or elsewhere
vagrant up
vagrant-libvirt(0.0.40) is compatible with Vagrant 2.0.2 if you are running Ruby 2.3, at least on Linux Mint 18.3 (Ubuntu 16.04). I used vagrant from the Debian download on the vagrantUp website and installed the plugin using it without any problem.

Vagrant up fails with loading plugin

The zulip setup requires having Vagrant setup.
https://github.com/zulip/zulip
But it fails in Ubuntu 14.04
$vagrant plugin install vagrant-lxc
Installing the 'vagrant-lxc' plugin. This can take a few minutes...
Installed the plugin 'vagrant-lxc (1.2.1)'!
$vagrant up
Failed to load the "vagrant-lxc" plugin. View logs for more details.
Bringing machine 'default' up with 'virtualbox' provider...
There are errors in the configuration of this machine. Please fix
the following errors and try again:
vm:
* The box 'ubuntu/trusty64' could not be found.
Any ideas what might be going wrong?
The problem do not seem to come from the plugin but from the box instead.
can you download the box using vagrant box add ubuntu/trusty64 https://atlas.hashicorp.com/ubuntu/boxes/trusty64
once the box is installed, you should be able to run vagrant up
Also why would you need vagrant-lxc plugin if you're running on normal ubuntu box, did you mean to use another box ?

Error message" The fix-no-tty provisioner could not be found" when I vagrant up with VVV

I'm currently trying to create a virtual environment for wordpress development. I've installed Git Bash, ConEmu, Virtual Box, Vagrant, Vagrant Host updater, Vagrant triggers, and Varying Vagrant Vagrants. the first time I used vagrant up, I got this message:
default: Successfully added box 'ubuntu/trusty64' (v20150609.0.10) for 'virtualbox'! There are errors in the configuration of this machine. Please fix the following errors and try again:
vm: * The 'fix-no-tty' provisioner could not be found.
I don't really have any idea what this means and have had little success finding information on the internet. Does anyone know what the fix-no-tty provisioner is and how i could fix it?
I encountered the same issue today with a new clone of VVV while running Vagrant 1.6.3. The fix-no-tty provisioner was introduced on April 29. Named provisioner support was added to Vagrant in version 1.7.0. I upgraded to Vagrant 1.7.2 and was able to bring the VM up.

Vagrant Up not working

I have issues running vagrant up command on windows 7,I have followed all the steps mentioned in this link
When I run the command vagrant up --provider=hashicorp/precise32, in command prompt,I get the following error.
The provider 'hashicorp/precise32' could not be found, but was
requested to back the machine 'default'. Please use a provider that
exists.
I have also disabled the Antivirus before installation, but that did not help.
Vagrant works with some Providers, as VirtualBox, Xen, VMWare, AWS, Digital Ocean and Docker.
The hashicorp/precise32 is a box. After Vagrant 1.5 the Vagrant Cloud is available.
For use Vagrant, following the steps:
Install Vagrant
Install a provider, as VirtualBox
Create a new folder, as project
Open folder project
Execute vagrant init hashicorp/precise32
Execute vagrant up --provider=virtualbox or just vagrant up

Resources