V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
lightryanking
V2EX  ›  Vagrant

求指导, vagrant 命令必须加虚拟机 ID 怎么破?

  •  
  •   lightryanking · 2017-07-30 08:10:56 +08:00 · 5408 次点击
    这是一个创建于 2433 天前的主题,其中的信息可能已经有所发展或是发生改变。

    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 太麻烦了!

    ifoolish
        1
    ifoolish  
       2017-07-30 09:07:25 +08:00 via iPhone   ❤️ 1
    我看你的命令行提示符为$。vagrant 命令要在 vagrantfile 目录执行
    precisi0nux
        2
    precisi0nux  
       2017-07-30 09:41:29 +08:00 via iPhone   ❤️ 1
    lightryanking
        3
    lightryanking  
    OP
       2017-07-30 14:34:25 +08:00
    @ifoolish 你是对的。。。Homestead 没打开,打开就可以了
    lightryanking
        4
    lightryanking  
    OP
       2017-07-30 14:34:46 +08:00
    @precisi0nux 谢谢!这个也可以
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2958 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 15:12 · PVG 23:12 · LAX 08:12 · JFK 11:12
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.