lightryanking
V2EX  ›  Vagrant

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

  •  
  •   lightryanking · Jul 30, 2017 · 6640 views
    This topic created in 3213 days ago, the information mentioned may be changed or developed.

    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  
       Jul 30, 2017 via iPhone   ❤️ 1
    我看你的命令行提示符为$。vagrant 命令要在 vagrantfile 目录执行
    precisi0nux
        2
    precisi0nux  
       Jul 30, 2017 via iPhone   ❤️ 1
    lightryanking
        3
    lightryanking  
    OP
       Jul 30, 2017
    @ifoolish 你是对的。。。Homestead 没打开,打开就可以了
    lightryanking
        4
    lightryanking  
    OP
       Jul 30, 2017
    @precisi0nux 谢谢!这个也可以
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3019 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 12:02 · PVG 20:02 · LAX 05:02 · JFK 08:02
    ♥ Do have faith in what you're doing.