Vagrant, Virtualbox: Provider 'virtualbox' not found. We'll automatically install it now - vagrant

I am running vagrant up command on Windows 7 box (Vagrantfile exists in work dir) and getting the message:
Provider 'virtualbox' not found. We'll automatically install it now...
Virtual box has been installed and vbox_install_path env variable is correctly set.
Working in intranet, there is no way to automatically install VB from the internet.

Vagrant 1.8.4 and older are not compatible with the VirtualBox 5.1.x.
Vagrant 1.8.5 has been released already and it supports the VirtualBox 5.1.x.

Sorted out. Vagrant 1.8.4 does not work with VirtualBox 5.1.0 (on Win7 at least). Fixed after VB version was changed to 5.0.20

Related

VirtualBox shared folders stopped working

For many months I had been successfully using VirtualBox 5.xx.xx along with Vagrant 2.xx (don't remember the rest of the version numbers) on a Windows 10 host with Ubuntu 16 guest. At some point in the past six weeks, on vagrant up Guest Additions started being reported as different versions on the host and guest, and changes I would make to my synced files from the Windows side would not always be realized on Ubuntu. To try to fix this problem, I upgraded Vagrant to the latest version, and then tried upgrading and downgrading VirtualBox from as low as 5.0.18 (generates an error on vagrant up) to as high as the latest (6.0.4). Trying 5.2.24 and 5.2.26 yielded messages upon Vagrant startup stating that Guest Additions on the host were reported as 5.0.18 but on the guest were reported as 5.2.24 (or .26). Then a final startup message stated that the Virtualbox version was at 5.2 and the Guest Additions version was 5.1.30 - so at times I've gotten a total of three different versions of Guest Additions reported. I have the vagrant-vbguest plugin installed. I downloaded the matching Guest Additions ISO version for the VBox versions, and loaded the Guest Additions ISO into the virtual optical drive in VirtualBox (as well as specified config.vbguest.iso_path = "VBoxGuestAdditions_5.x.x.iso" in my Vagrantfile.
My Vagrant/VirtualBox setup had been working fine for probably at last a year, and I never wanted to "upgrade" because I've been through this mess before when "upgrading" to newer versions. From too-long searching online, I'm pretty sure this problem has been caused from doing dist-upgrade to Ubuntu (which I do regularly) because I've changed nothing in the Vagrant/VBox setup for a long time. I was hoping that the upgrade to the latest VirtualBox (6) would solve the problem but, sadly, this version is even worse - Ubuntu cranks SLOWLY through the boot process, and it's been taking so long that I haven't even let it finish after trying several times.
It would be great to see if this latest VirtualBox 6 would solve the problem, so maybe someone has an idea about why that would be so slow (I have an 8 core 16Gb machine, and I've assigned 4 cores and plenty of RAM to VBox - and it starts up fine under 5.2.xx).
The vagrant up output:
SSH username: vagrant
SSH auth method: private key
Warning: Connection reset. Retrying...
default: Machine booted and ready! Got different reports about
installed GuestAdditions version: Virtualbox on your host claims:
5.0.18 VBoxService inside the vm claims: 5.2.26 Going on, assuming VBoxService is correct...
GuestAdditions seems to be installed (5.2.26) correctly, but not
running. Got different reports about installed GuestAdditions version:
Virtualbox on your host claims: 5.0.18 VBoxService inside the vm
claims: 5.2.26
Going on, assuming VBoxService is correct...
Job for vboxadd-service.service failed because the control process
exited with error code. See "systemctl status vboxadd-service.service"
and "journalctl -xe" for details.
Got different reports about installed GuestAdditions version:
Virtualbox on your host claims: 5.0.18 VBoxService inside the vm
claims: 5.2.26 Going on, assuming VBoxService is correct... bash: line
4: setup: command not found
Checking for guest additions in VM...
The guest additions on this VM do not match the installed version of
VirtualBox! In most cases this is fine, but in rare cases it can
prevent things such as shared folders from working properly. If you
see shared folder errors, please make sure the guest additions within
the virtual machine match the version of VirtualBox you have installed
on your host and reload your VM.
Guest Additions Version: 5.1.30
VirtualBox Version: 5.2 The following SSH command responded with a
non-zero exit status. Vagrant assumes that this means the command
failed!
After many hours of searching and trying different suggestions, the following is what solved the problem:
downloaded the latest unofficial release build of VirtualBox (in my case 5.2.27) and installed it
Placed the following in my Vagrantfile: config.vbguest.iso_path = "https://www.virtualbox.org/download/testcase/VBoxGuestAdditions_5.2.27-129578.iso"
Ran vagrant up
Ubuntu booted OK, but on the host side Vagrant was displaying an error message something like this:
Failed to mount folders in Linux guest. This is usually because the
"vboxsf" file system is not available.
So next, on the booted Ubuntu guest:
sudo apt autoremove to clean up the Linux headers
And then:
Run vagrant vbguest from the host
vbguest then went through a process of uninstalling the existing Guest Additions and installing VBoxGuestAdditions_5.2.27 from the config.vbguest.iso_path.
To verify that Guest Additions are installed properly, run vagrant vbguest --status (or just vagrant vbguest again). Both commands returned:
[default] GuestAdditions 5.2.27 running --- OK.
The above operations resulted in a folder named VBoxGuestAdditions-5.2.27 being placed within the /opt folder. This VBoxGuestAdditions-5.2.27 folder has seven subfolders, two files (uninstall.sh and routines.sh) and a LICENSE file. I can find no documentation about vagrant-vbguest placing the installed items into the /opt folder, but I did find a small mention here.
I suspect that this process would have worked for any of the 5.2.xx versions (available here), but I had already installed 5.2.27 so went ahead with that.
I had he same issue after updating laravel/homestead box to v7.2.1 . This blog post helped me solve it.
in summary, this is what you have to do:
navigate to the directory that contains your Vagrantfile and run vagrant plugin install vagrant-vbguest
The first time I executed the command, it disabled my WiFi adapter and the installation failed. If this happens, re-activate it back and rerun the command.
when it is done installing, run vagrant up to boot the VM. It will update the Guest Additions

Vagrant VM is running but not showing up in Virtualbox Manager (MacOS)

I've recently installed VirtualBox, Vagrant and Chef DK and when I run kitchen converge my VM comes up properly provisioned with my cookbook using vagrant and the Virtualbox provider however I am unable to view or manage the vm from the VirtualBox Manager
I can however view see the vm running via kitchen list or vagrant global-status
Upon reviewing where the .vbox is being loaded I can see that its going in the ~/my_cookbook/.kitchen/nameofvm/ folder
When I review the default Machine location set in Virtual box i can see it's located in the /Users//VirtualBox VMs/ folder however it does not appear to be following this attribute
So far i've reinstalled vagrant, VirtualBox and Chef DK
I'm running MacOS Sierra 10.12.6 and only have started having this issue since upgrading to MacOS Sierra.
Anyone have any recommendations or some extra steps that I could take to potentially resolve this issue?
Chef Development Kit Version: 2.1.11
chef-client version: 13.2.20
delivery version: master (73ebb72a6c42b3d2ff5370c476be800fee7e5427)
berks version: 6.3.0
kitchen version: 1.17.0
inspec version: 1.33.1
vboxmanage -v
5.1.26r117224
Vagrant 1.9.8
This was an inadvertent mis-feature of a change in kitchen-vagrant, which has since been reverted. ChefDK 2.2 includes this fixed version of kitchen-vagrant and should be released either later today or tomorrow morning. You can also roll back to ChefDK 2.0. Sorry for the trouble.

Vagrant laravel/homestead shared folders not mounting after 2.1.0 update

I have scoured the internet up and down for this issue and always consider asking here a last resort. That being said if this has been asked and solved before please point me in the right direction.
I am using Virtualbox 5.1.22 on macOS Sierra 10.12.5 with vagrant version 1.9.6
Yesterday I upgraded my homestead box from version 2.0.0 to 2.1.0. I only upgraded after running vagrant up and it did its thing and was fine until I come in today and turn my machine one and try booting up the vagrant machine again. I get the following error at the end of the normal stuff:
Vagrant was unable to mount VirtualBox shared folders. This is usually
because the filesystem "vboxsf" is not available. This filesystem is
made available via the VirtualBox Guest Additions and kernel module.
Please verify that these guest additions are properly installed in the
guest. This is not a bug in Vagrant and is usually caused by a faulty
Vagrant box. For context, the command attempted was:
mount -t vboxsf -o uid=900,gid=900 vagrant /vagrant
The error output from the command was:
/sbin/mount.vboxsf: mounting failed with the error: No such device
I have tried vagrant reload, vagrant halt and then vagrant up, restarting the machine and re-running, vagrant reload --provision
Any help is greatly appreciated.
Thanks.
EDIT: Why the downvote? This seems like a perfectly reasonable question?
The box comes with VirtualBox Guest Addition for a given version of VirtualBox, which is not the one you're running on your host.
what you need to do is update the Guest Additions in your guest VM to the same version of VirtualBox that you run on your host machine.
The easy way as mentioned in my comments is to use the vagrant vbguest plugin, it will compare the version from your host and guest software and will automatically aligned if needed. I find it pretty convenient and there are options to disable the update if you need.
In case you do not want to run an additional plugin, you can make the update on the guest VM manually.
You will need to download the Guest Addition for the same version of your VirtualBox (5.1.22 in your case) and follow the instructions to install
So I found and installed this: https://github.com/dotless-de/vagrant-vbguest
I have no idea why I need a plugin now when it was working just fine before updating but hey...it works.

Unable to vagrant up - how to set "providers"

I am trying run vagrant but after vagrant up error appears:
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.
I installed before VirtualBox version 4.3.26 r989888 and Linux Ubuntu (64 bit)
After:
vagrant box add precise32 http://files.vagrantup.com/precise32.box
==> box: Adding box 'precise32' (v0) for provider:
box: Downloading: http://files.vagrantup.com/precise32.box
box: Progress: 100% (Rate: 1425k/s, Estimated time remaining: --:--:--)
==> box: Successfully added box 'precise32' (v0) for 'virtualbox'!
when I list
vagrant box list
lucid32 (virtualbox, 0)
precise32 (virtualbox, 0)
What is wrong with "provider"
vagrant package --base vagrant-ubuntu64
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 to help him detect VirtualBox ?
Quick note - Vagrant 1.8.4 and Virtualbox 5.1.X aren't compatible on MacOS 10.11 (can't set a provider).
Virtualbox 5.0.10 works just fine.
I was able to fix this simply by installing the latest version of Vagrant (as of this writing 1.7.4).
simply try to bring vagrant up and specify provider you want to use:
vagrant up --provider virtualbox
As per screenshot below, it will tell you the reason why specified provider is not working. In my case, it was an unsupported version of VirtualBox 5.2. I had to downgrade it to v 5.1
There seems to have been an issue reported since VirtualBox 4.3.12:
VirtualBox automatically create the following environment variable VBOX_MSI_INSTALL_PATH
However, vagrant (if you look for the base.rb file) uses the variable VBOX_INSTALL_PATH
So you can
- update the variable name VBOX_MSI_INSTALL_PATH and change it to VBOX_INSTALL_PATH
- create a new variable name VBOX_INSTALL_PATH with the same value as VBOX_MSI_INSTALL_PATH
Reminder on windows go to My Computer (right click) --> Properties --> Advanced System Settings --> Environment Variables and look for the variable you need to manage
ok so I was having the same issue with windows, vagrant and virtualbox and did this.
click on "This PC" / "My Computer" on windows desktop
Select "Properties"
Go to "Advanced" tab
Click "Environment Variables..." at the bottom
Under System Variables click "New..."
Set "Variable name" to "VBOX_INSTALL_PATH"
Set "Variable value" to "C:\Program Files\Oracle\VirtualBox\"
Select "OK" and close all the other settings windows
credit goes to here:
https://github.com/mitchellh/vagrant/issues/3852
I am assuming that there is a Environment Variable ( or PATH for linux users I think :P) that needs the "path" to the virtualbox executable.
I'm running macOS 10.12 and installed vagrant 5.1 using homebrew.
I got the same error as the OP and fixed it by downloading the latest version of VirtualBox (v5.1.6).
N.B. This version is labeled amd64 on the download page, this is just the name of the 64 bit standard and will install fine on Intel macs.
I had installed Virtualbox 6.1 and Vagrant 2.2.6 and got this error on a Mac. I had to revert Virtualbox to 6.0 and then vagrant up worked with ubuntu/trusty64. See #Serge Voloshenko's answer above for how to discover if it's a compatibility issue.
It is just the Version problems either it can be problem from vagrant or from Virtual box to connect
Try this : vagrant up --provider virtualbox
Above command will help if the version of virtual box is compatible or not and it will also suggest which are the current linkable versions of Virtual box
Currently : 4.0,4.1,4.2,4.3,5.0,5.1,5.2 are the versions of virtual box that are working
By the way, If you are worrying about version of Vagrant, I have tried current version : 2.0.3

Setting up vagrant in virtualbox

I just downloaded virtualbox, installed centos and development tools.
I also installed vagrant and installed it, in windows 7.
It says in the vagrant page, you can install vagrant in virtualbox using
$ vagrant init hashicorp/precise32
$ vagrant up
But, I am getting vagrant command not found Are they supposed to be installed inside one another? because, if I download/install them separately, I don't know how my virtualbox could even understand the vagrant command.
Vagrant and VirtualBox are entirely separate. Vagrant uses VirtualBox by calling VBoxManage commands. Both vagrant and vboxmanage binaries need to be on your system PATH variable.
In Windows you can check and adjust the PATH as shown here: http://www.computerhope.com/issues/ch000549.htm

Resources