vagrant lavarel 环境终于搭建好了,比如我想关闭虚拟机,直接 vagrant halt 不行,得 vagrant halt [ID]才可以!
$ vagrant halt
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.
$ vagrant halt e8a5aea
==> homestead-7: Attempting graceful shutdown of VM...
明明只有一个虚拟机啊,怎样设置才可以不用加 ID,每个命令都要加 ID 太麻烦了!
![]() | 1 ifoolish 2017-07-30 09:07:25 +08:00 via iPhone ![]() 我看你的命令行提示符为$。vagrant 命令要在 vagrantfile 目录执行 |
![]() | 2 precisi0nux 2017-07-30 09:41:29 +08:00 via iPhone ![]() |
![]() | 3 lightryanking OP @ifoolish 你是对的。。。Homestead 没打开,打开就可以了 |
![]() | 4 lightryanking OP @precisi0nux 谢谢!这个也可以 |