virtualbox+vagrant -2(command cli)-4-vagrant global-status Commands

Global Status

Format:

vagrant global-status

This command will tell you the status of all active vagrant environments on the currently logged in user’s system</ p>

userdeMacBook-Pro:~ user$ vagrant global-status -h
Usage: vagrant global-status

        --prune                      Prune invalid entries.  Delete invalid entries
    -h, --help                       Print this help Print help information

⚠️

This command does not actively verify the state of the machine; instead, it is a cache based operation. That’s why it’s possible to see stale results (machines say they’re running, but they’re not)

For example, if you restart your computer, vagrant won’t know. To remove invalid entries, use the — prune flag to run the global state

For example, there is an ID in the output that looks like a1b2c3, which can be used to control the vagrant machine from any position in the system. Any vagrant command that uses the target machine (such as up, halt, destroy) can use this ID to control it

For example: vagrant destroy a1b2c3 means to destroy the vagrant machine specified by ID a1b2c3

Environment not showing up

If your environment does not appear, you may have to carry out vagrant destroy first, and then vagrant up

If you just upgrade from the previous version of vagrant, the existing environments will not appear globally until they are destroyed and recreated

Similar Posts: