0

I am new with Vagrant. My supervisor want me to run a website. First of all he told me to install VirtualBox and Vagrant. He sent me bootstrap.sh and Vagrantfile files. He told me to copy this in a folder called "data_repo". After that he told me to run "vagrant up" command from "data_repo". I did that but it is giving me following error:

A Vagrant environment or target machine is required to run this
command. Run `vagrant init` to create a new Vagrant environment. Or,
get an ID of a target machine from `vagrant global-status` to run
this command on. A final option is to change to a directory with a
Vagrantfile and to try again.

Could you please let me know the way to fix it?

Beautiful Mind
  • 5,828
  • 4
  • 23
  • 42
  • Can you post the contents of bootstrap.sh, and the Vagrantfile. – Stefan Jul 30 '15 at 18:43
  • you must not be in the `data_repo` directory or the `Vagrantfile` is not present. I think the best way is to go talk to your supervisor and ask him for little support – Frederic Henri Jul 31 '15 at 06:45
  • Reading the documentation is always helpful. https://www.vagrantup.com/docs/getting-started/ – greenhorn Mar 02 '16 at 00:17

4 Answers4

1

I had the same problem on a Windows machine and I solved it this way: rename the file Vagrantfile.txt to Vagrantfile (without .txt).

Mike
  • 11
  • 2
0

I had same problem on linux system. By mistake I deleted Vagrantfile file.

Shivali
  • 21
  • 3
0

There should be only one Vagrantfile. Make sure you have Vagrantfile (V capital and no extension) in that folder(data_repo).

Follow the documentation here

https://www.vagrantup.com/docs/getting-started/

Shadab Salam
  • 61
  • 1
  • 5
0

I ran into the same issue, only to realize there was a trailing space in the filename Vagrantfile. Just had to remove it to get it to work.

leodotcloud
  • 1,830
  • 14
  • 15