vagrant INIT works, vagrant UP - doesn't work - windows

I have installed Git, VirtualBox and Vargant on my Windows 10 computer.
Have problems with starting Vargant using git-bash console.
When I do vargant init - this create vargant file and looks like it's ok.
Alex#DESKTOP MINGW64 /d/shell
$ vagrant init hashicorp/precise32
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.
But when I try to start vagrant with vagrant up command I receive error.
Alex#DESKTOP MINGW64 /d/shell
$ vagrant up
bash: vagrant: command not found
I have tried restarting, reinstalling these software, installing latest or previouse versions of software - nothing helps - still bash: vagrant: command not found.
What shell I do next to solve the problem?

the command / program name is vagrant , not vargant. You spell it correctly in the init, but the rest of your examples have it spelled incorrect. Try running vagrant up and you should be all set.

Related

Vagrant / Git Bash : Window Freezes

I am attempting to learn a bit about the command line and am following a free online course. I have been instructed to install a number of programs on my computer including VirtualBox, Vagrant and Git which I have done. There was a VagrantFile which I have also downloaded.
The problem I have is that Git Bash is not responding to any vagrant command. I am not familiar enough with the command line to test other programs or commands out but I have checked the Python version for example and got a response.
So when I attempt to run any vagrant command the interface returns the same location and then freezes. I can click and highlight within the window but it will not take any keyboard input. This happens regardless of whether I navigate to the vagrantfile folder or not.
Really confused! I have uninstalled and re-installed all the programs.
Currently operating:
Windows 10
Vagrant 1.9.7
Oracle VM VitualBox 5.1.26
Git 2.14.0
... MINGW64 ~
$ cd Desktop/Shell
... MINGW64 ~/Desktop/Shell
$ vagrant up
... MINGW64 ~/Desktop/Shell
$
// At this point the interface freezes and won't accept
// any input. It is the same if I call
// vagrant init
// vagrant --version
// vagrant halt --force
Any help would be hugely appreciated.
Thanks Chris.

Vagrant unable to provision from a machine despite copy/pasting the path

I'm having trouble starting Vagrant with Virtual box. The code I enter into a blank project folder on the command line is:
vagrant init tsawler/wafs; vagrant up --provider virtualbox
In response I get the following message:
C:\Users\Owner\PhpstormProjects\modernphptut>vagrant init tsawler/wafs; vagrant up --provider virtualbox
An invalid option was specified. The help for this command
is available below.
Usage: vagrant init [options] [name [url]]
Options:
--box-version VERSION Version of the box to add
-f, --force Overwrite existing Vagrantfile
-m, --minimal Create minimal Vagrantfile (no help comments)
--output FILE Output path for the box. '-' for stdout
-h, --help Print this help
I am copying the command line text exactly as shown on this page: https://atlas.hashicorp.com/tsawler/boxes/wafs
This is my first attempt using Vagrant/virtual machines. Anyone know why it's not working? I installed Vagrant and Virtualbox just today on my Windows 10 machine so I have the most recent versions.
This is a multiple line command and this
vagrant init tsawler/wafs; vagrant up --provider virtualbox
works well in linux or mac os but does not work for windows.
For windows you should run as
vagrant init tsawler/wafs & vagrant up --provider virtualbox
Or you can also run the commands one by one
C:\Users\Owner\PhpstormProjects\modernphptut>vagrant init tsawler/wafs
.....
C:\Users\Owner\PhpstormProjects\modernphptut>vagrant up --provider virtualbox

vagrant, install chef/centos-6.6

My vagrant version is:
$ vagrant --version
Vagrant version 1.0.1
Following these instructions, vagrant init works:
$ vagrant init chef/centos-6.6
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.
But vagrant up can't find the box:
$ vagrant up
There was a problem with the configuration of Vagrant. The error message(s)
are printed below:
vm:
* The box 'chef/centos-6.6' could not be found.
What is the way to configure vagrant, or the command line option, to use chef/centos-6.6?
Chef has removed all of their boxes from atlas. They have left a comment here https://atlas.hashicorp.com/chef/ saying:
If you are looking for Bento boxes they now have their own
organization https://atlas.hashicorp.com/bento/
If you trigger a:
vagrant box add chef/centos-6.6
with the outdated source (chef) it will provide feedback leading to bento as the new source, something along the lines of:
Name: bento/centos-6.6
Provider: virtualbox
Version: 2.2.0
This eventually makes more concrete what is written on the site at the chef atlas link, that the command in your question shall now instead be:
$ vagrant init bento/centos-6.6
(replacing chef by bento)
Some time ago hashicorp moved their images to atlas. Boxes are now downloaded here:
https://atlas.hashicorp.com/boxes/search
Your box is here:
https://atlas.hashicorp.com/chef/boxes/centos-6.6
I can download the box with Vagrant 1.7.2. You are using 1.0.1.
So i think it's a version issue. You have to install a newer version.

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

No synced vagrant folder to be found

I am trying to work through the "Getting Started" section at the vagrant site. I run through the two commands they show:
$ vagrant init hashicorp/precise32
$ vagrant up
All seems to go well. I then run these two commands:
$ vagrant ssh
$ lsb_release -a
The result shows I'm running on Ubuntu 12.04, precise. So far so good.
However, when I do an 'ls' the only thing in the directory is a postinstall.sh file. I thought I should have been in the same directory as the Vagrantfile.
Sorry for such a newbie question. I'm sure its something basic I messed up.
I'm doing this on an Ubuntu 14.10 box with Virtualbox 4.3.22 and Vagrant 1.7.2 installed.
Thanks
By default, Vagrant will share your project directory (the directory with the Vagrantfile) to /vagrant on the guest machine.

Resources