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.
环境:osx 10.11,vagrant 1.7.4
以上是详细的错误信息,虽然使用vagrant up [id] 可以解决,但是之前不需要指定也可以的,是什么问题?
PHP中文网2017-05-16 16:56:20
Vagrant使用流程(个人总结):
1.查看本地box列表:
vargant box list
2.选取box,并初始化环境:
vagrant init [box name]
此时会产生.vagrant/
和Vagrantfile
3.编辑Vagrantfile
文件,比如IP啊,CPU个数啊,RAM啊
4.开启vagrant
vagrant up
看看你少了哪一步吧。