vagrant is not a recognised internal/external command - vagrant

I have cloned a repository from Github following a course on Udacity. It contains a vagrant file and according to the tutorial I shoulld use vagrant up command to get the virtual machine started. But it says that vagrant is not a recognized internal/external command. How can I fix this?

Install Vagrant for Windows, if your machine OS is windows.
https://www.vagrantup.com/downloads.html
Restart computer.
Install Virtualbox from Virtualbox SDK
https://www.virtualbox.org/wiki/Downloads
VirtualBox 5.2.6 platform packages. The binaries are released under the terms of the GPL version 2.
Windows hosts
Once Virtual box is installed, run the command on the cmd prompt.
vagrant up --provision

I'm in the same course on Udacity and I think the issue you are having can be resolved by adding C:\Hashicorp\Vagrant\bin to your system variables path.
Instructions for editing your path can be found here: Where can I set path to make.exe on Windows?
This fixed the error for me.

Related

Error: No such file or directory # rb_sysopen - C:/ProgramData/hashicorp/vagrant-vmware-desktop/certificates/vagrant-utility.client.crt

In my windows 10, after I installed
​vagrant plugin install vagrant-vmware-desktop
then i execute vagrant up I get error:1
>vagrant up
Vagrant encountered an error while attempting to load the utility
service key file. This error can occur if the Vagrant VMware Utility
has not yet been installed, or if it was installed incorrectly. If
this error persists after running the Vagrant VMware Utility installer
again, please contact support at: support#hashicorp.com
Information about the Vagrant VMware Utility, including installation
instruction, can be found here:
https://www.vagrantup.com/docs/vmware/vagrant-vmware-utility.html
Path: C:/ProgramData/hashicorp/vagrant-vmware-desktop/certificates/vagrant-utility.client.crt
Error: No such file or directory # rb_sysopen - C:/ProgramData/hashicorp/vagrant-vmware-desktop/certificates/vagrant-utility.client.crt
It seems the Vagrant Vmware utility is missing, you can run the following command and check if the Vmware utility service is running or not
net start vagrant-vmware-utility
If it is not present, install it from here for windows. you can look for other links for different platforms.
Once installed re-install the utility -
vagrant plugin install vagrant-vmware-desktop
After installation is complete you should have a folder similar to this:
C:\HashiCorp\VagrantVMwareUtility

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

Why Rethinkdb don't have binary for windows?

I am interested in Rethinkdb and would like to develop/test on it, but main problem is: it don't have package for windows operating system. I tried to compile from source code, that was also not possible as there was no any instruction.
What makes it so difficult to make executable for windows? Is there any alternative way to install Rethinkdb in windows OS? even very small and not that famous application has windows binary but not Rethinkdb. It is quite surprise for me. Another surprising is there are many community executable for other OS but not windows.
Thank you for understanding and waiting for good answer.
Rethinkdb just announced that it started development for Windows. Please follow
[1] https://github.com/rethinkdb/rethinkdb/issues/1100
[2] https://twitter.com/segphault/status/590633792781611009
Update:
RethinkDB announced in Windows :
[3] https://rethinkdb.com/docs/install/windows/
Cross-platform development isn't that easy. RethinkDB uses some features under the covers which makes porting it to Windows a difficult job, f.e. a Unix toolchain for the builds and Unix syscalls. For more information on that have a look at this GitHub issue. It states that Windows support is planned, but with low priority.
As a quick fix, you could RethinkDB run in a virtual machine or in Microsoft Azure. For the second one, I wrote a blog post a few weeks ago.
RethinkDB has already started development for Windows. While it's not released yet, this is how you can run it through Vagrant. See: https://github.com/gearz-lab/rethinkdb-vagrant
I'm using Chocolatey, feel free to skip steps if they don't apply.
Installing Chocolatey
Open Powershell as an administrator and run this command:
iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))
... now you should have Chocolatey installed. We're gonna use to install the others.
Installing Vagrant
Run this as an administrator:
choco install vagrant -y
Installing VirtualBox
Vagrant relies on a virtualization application that it calls a "provider". The default one is VirtualBox so let's install it. Run cmd as administrator and run this:
choco install virtualbox -y
Now you should be able to run the vboxmanage command. If it doesn't work, make sure C:\Program Files\Oracle\VirtualBox is in your PATH.
Installing Cygwin
We're gonna log on a virtual machine using SSH, so we need a SSH enabled terminal. For that, let's use Cygwin.
choco install cyg-get -y
Installing Cygwin packages
There'are two Cygwin packages we need to install, openssh, because Cygwin doesn't have SSH support by default, and rsync so Vagrant can use it to synchronize files between the host and the guest machines.
On PowerShell, running as an administrator, let's run these commands:
cyg-get openssh
cyg-get rsync
Cloning rethinkdb-vagrant
Open the Cygwin64 Terminal. You should now be in your Cygwin home folder, which should look like C:\tools\cygwin\home\[YOUR_USER].
Make sure you have git installed. If you don't just choco install git -y. Now, clone rethyinkdb-vagrant:
git clone https://github.com/gearz-lab/rethinkdb-vagrant.git
Now you should have a directory like this: C:\tools\cygwin\home\[YOUR_USER]\rethinkdb-vagrant.
Starting Vagrant and useful commands
From inside the Cygwin64 Terminal home directory (described in the last step), type cd rethinkdb-vagrant, now, any Vagrant commands will target cd rethinkdb-vagrant.
To setup and boot the machine: vagrant up (After this, RethinkDB is available, see next step).
To access the machine's terminal: vagrant ssh.
To destroy the machine (every RethinkDB data will be lost): vagrant destroy.
To suspend the machine: vagrant suspend.
To resume a suspended machine: vagrant resume.
Accessing RethinkDB.
Make sure you have vagrant up from the last step. Now:
For accessing the web administration tool: http://localhost:8080.
For accessing RethinkDB from a client app, the port is 28015.

Unable to run vagrant up due to Vbox error (MS 81.)

I am on Windows 8.1
When i attempt to install vagrant and run it with virtual box i always get the following 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 have tried different things such as uninstalling both virtual box and vagrant and re-installing them.
I have tried installing vagrant first then vbox and the other way around also but no change.
I am new to vagrant so if anyone can assist please.
I bet that you're using the latest VirtualBox version (4.3.12). If so, there's a known issue which will be addressed in Vagrant 1.6.3:
https://github.com/mitchellh/vagrant/issues/3852
As a workaround you can install VirtualBox 4.3.10 and it will work flawlessly.
As Emyl said, you can either downgrade your VirtualBox or upgrade your Vagrant to 1.6.3(as the issue has been fixed in this version).
But if you want to have a quick fix on this issue you can simply change the environmental variable name for the Virtual Box installation path from VBOX_MSI_INSTALL_PATH to VBOX_INSTALL_PATH
(This PC -> Advanced System Settings -> Environmental Variables -> Search for VBOX_MSI_INSTALL_PATH and change it to VBOX_INSTALL_PATH)
Make sure to restart your terminal before doing vagrant up again.
You are done!
changing VBOX_MSI_INSTALL_PATH and change it to VBOX_INSTALL_PATH in environment variables and then restarting terminal resolved my issue :)
I also had this problem on Windows 8.1 and solved it by restarting my computer. If you have just installed VirtualBox, you may need to restart your command prompt or Windows for the environment variables to get read correctly when you run "vagrant up".
i had to run the cmd.exe as administrator to make this work after using Sri Harsha Kappala solution

Resources