lightryanking
V2EX  ›  Vagrant

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

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