流浪机器的“准备”状态是什么?

流浪机器的“准备”状态是什么?

当我运行 时vagrant global-status,我看到我的一些机器处于“准备”状态,这是我以前没有看到的。这个状态是什么意思?在我专门检查服务器的状态后,global-status它似乎变为。running

$ vagrant global-status
id       name         provider state     directory
-----------------------------------------------------------------------------
1b9c91d  arthur       aws    running   /Users/afarrell/projects/saltmarsh
824fc08  sir-lancelot aws    preparing /Users/afarrell/projects/saltmarsh
2dc5f8a  sir-galahad  aws    preparing /Users/afarrell/projects/saltmarsh
cfb0009  sir-robin    aws    preparing /Users/afarrell/projects/saltmarsh
The above shows information about...[clipped]

$ vagrant status sir-robin
Current machine states:

sir-robin                 running (aws)

The EC2 instance is running. To stop this machine, you can run
`vagrant halt`. To destroy the machine, you can run `vagrant destroy`.

$ vagrant global-status
id       name         provider state     directory
-----------------------------------------------------------------------------
1b9c91d  arthur       aws    running   /Users/afarrell/projects/saltmarsh
824fc08  sir-lancelot aws    preparing /Users/afarrell/projects/saltmarsh
2dc5f8a  sir-galahad  aws    preparing /Users/afarrell/projects/saltmarsh
cfb0009  sir-robin    aws    running   /Users/afarrell/projects/saltmarsh

答案1

当读取配置并创建虚拟机时,会进入“准备”阶段,但提供商尚未确认虚拟机是否正在“运行”。使用 VirtualBox 时,这一阶段非常快,通常您永远不会看到该阶段,但使用远程实例时,准备阶段可能需要一些时间。

顺便说一句,如果有疑问请使用来源:https://github.com/mitchellh/vagrant

相关内容