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.
Environment: osx 10.11, vagrant 1.7.4
The above is the detailed error message. Although it can be solved by using vagrant up [id], it does not need to be specified before. What is the problem?
Vagrant usage process (personal summary):
1. View the local box list:
2. Select the box and initialize the environment:
It will be generated at this time
.vagrant/
和Vagrantfile
3. Edit
Vagrantfile
files, such as IP, number of CPUs, RAM4. Start vagrant
See what step you are missing.
I personally feel that it is not running in the vagrantfile directory, so this error is reported