S M Shamimul Hasan
S M Shamimul Hasan

Reputation: 6684

vagrant up command issue

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?

Upvotes: 0

Views: 2811

Answers (4)

leodotcloud
leodotcloud

Reputation: 1960

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.

Upvotes: 0

Shadab Salam
Shadab Salam

Reputation: 61

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/

Upvotes: 0

Shivali
Shivali

Reputation: 21

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

Upvotes: 0

Mike
Mike

Reputation: 11

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

Upvotes: 1

Related Questions