流浪者 "Timed out while waiting for the machine to boot."
Vagrant "Timed out while waiting for the machine to boot."
我之前有一个使用 vagrant 1.8.1 和 virtualbox 5.0.22 的工作设置,但是在升级到 vagrant 1.8.5 和 5.1.0 之后,我现在得到了可怕的 "Timed out while waiting for the machine to boot."
除了降级之外还有其他选择吗?
完整输出:
Bringing machine 'centos7' up with 'virtualbox' provider...
==> centos7: Importing base box 'centos/7'...
==> centos7: Matching MAC address for NAT networking...
==> centos7: Checking if box 'centos/7' is up to date...
==> centos7: Setting the name of the VM: centos7-openvpn
==> centos7: Clearing any previously set network interfaces...
==> centos7: Preparing network interfaces based on configuration...
centos7: Adapter 1: nat
centos7: Adapter 2: bridged
==> centos7: Forwarding ports...
centos7: 22 (guest) => 2222 (host) (adapter 1)
==> centos7: Running 'pre-boot' VM customizations...
==> centos7: Booting VM...
==> centos7: Waiting for machine to boot. This may take a few minutes...
centos7: SSH address: 127.0.0.1:2222
centos7: SSH username: vagrant
centos7: SSH auth method: private key
centos7: Warning: Remote connection disconnect. Retrying...
centos7:
centos7: Vagrant insecure key detected. Vagrant will automatically replace
centos7: this with a newly generated keypair for better security.
centos7:
centos7: Inserting generated public key within guest...
centos7: Removing insecure key from the guest if it's present...
centos7: Key inserted! Disconnecting and reconnecting using new SSH key...
centos7: Warning: Authentication failure. Retrying...
centos7: Warning: Authentication failure. Retrying...
centos7: Warning: Authentication failure. Retrying...
centos7: Warning: Authentication failure. Retrying...
centos7: Warning: Authentication failure. Retrying...
centos7: Warning: Authentication failure. Retrying...
centos7: Warning: Authentication failure. Retrying...
centos7: Warning: Authentication failure. Retrying...
centos7: Warning: Authentication failure. Retrying...
centos7: Warning: Authentication failure. Retrying...
centos7: Warning: Authentication failure. Retrying...
centos7: Warning: Authentication failure. Retrying...
centos7: Warning: Authentication failure. Retrying...
centos7: Warning: Authentication failure. Retrying...
centos7: Warning: Authentication failure. Retrying...
centos7: Warning: Authentication failure. Retrying...
centos7: Warning: Authentication failure. Retrying...
centos7: Warning: Authentication failure. Retrying...
centos7: Warning: Authentication failure. Retrying...
centos7: Warning: Authentication failure. Retrying...
centos7: Warning: Authentication failure. Retrying...
centos7: Warning: Authentication failure. Retrying...
centos7: Warning: Authentication failure. Retrying...
centos7: Warning: Authentication failure. Retrying...
centos7: Warning: Authentication failure. Retrying...
centos7: Warning: Authentication failure. Retrying...
centos7: Warning: Authentication failure. Retrying...
Timed out while waiting for the machine to boot. This means that
Vagrant was unable to communicate with the guest machine within
the configured ("config.vm.boot_timeout" value) time period.
If you look above, you should be able to see the error(s) that
Vagrant had when attempting to connect to the machine. These errors
are usually good hints as to what may be wrong.
If you're using a custom box, make sure that networking is properly
working and you're able to connect to the machine. It is a common
problem that networking isn't setup properly in these boxes.
Verify that authentication configurations are also setup properly,
as well.
If the box appears to be booting properly, you may want to increase
the timeout ("config.vm.boot_timeout") value.
这是由错误 #7610 引起的,该错误已在 git 中修复。
您可以在等待新版本发布时自行应用修复,方法是编辑文件 vagrant/plugins/guests/linux/cap/public_key.rb
并应用错误报告中描述的以下更改:
diff -uNr vagrant-original/plugins/guests/linux/cap/public_key.rb vagrant/plugins/guests/linux/cap/public_key.rb
--- vagrant-original/plugins/guests/linux/cap/public_key.rb 2016-07-19 12:06:56.575045974 -0500
+++ vagrant/plugins/guests/linux/cap/public_key.rb 2016-07-19 12:07:34.303376009 -0500
@@ -54,6 +54,7 @@
if test -f ~/.ssh/authorized_keys; then
grep -v -x -f '#{remote_path}' ~/.ssh/authorized_keys > ~/.ssh/authorized_keys.tmp
mv ~/.ssh/authorized_keys.tmp ~/.ssh/authorized_keys
+ chmod 0600 ~/.ssh/authorized_keys
fi
rm -f '#{remote_path}'
我之前有一个使用 vagrant 1.8.1 和 virtualbox 5.0.22 的工作设置,但是在升级到 vagrant 1.8.5 和 5.1.0 之后,我现在得到了可怕的 "Timed out while waiting for the machine to boot."
除了降级之外还有其他选择吗?
完整输出:
Bringing machine 'centos7' up with 'virtualbox' provider...
==> centos7: Importing base box 'centos/7'...
==> centos7: Matching MAC address for NAT networking...
==> centos7: Checking if box 'centos/7' is up to date...
==> centos7: Setting the name of the VM: centos7-openvpn
==> centos7: Clearing any previously set network interfaces...
==> centos7: Preparing network interfaces based on configuration...
centos7: Adapter 1: nat
centos7: Adapter 2: bridged
==> centos7: Forwarding ports...
centos7: 22 (guest) => 2222 (host) (adapter 1)
==> centos7: Running 'pre-boot' VM customizations...
==> centos7: Booting VM...
==> centos7: Waiting for machine to boot. This may take a few minutes...
centos7: SSH address: 127.0.0.1:2222
centos7: SSH username: vagrant
centos7: SSH auth method: private key
centos7: Warning: Remote connection disconnect. Retrying...
centos7:
centos7: Vagrant insecure key detected. Vagrant will automatically replace
centos7: this with a newly generated keypair for better security.
centos7:
centos7: Inserting generated public key within guest...
centos7: Removing insecure key from the guest if it's present...
centos7: Key inserted! Disconnecting and reconnecting using new SSH key...
centos7: Warning: Authentication failure. Retrying...
centos7: Warning: Authentication failure. Retrying...
centos7: Warning: Authentication failure. Retrying...
centos7: Warning: Authentication failure. Retrying...
centos7: Warning: Authentication failure. Retrying...
centos7: Warning: Authentication failure. Retrying...
centos7: Warning: Authentication failure. Retrying...
centos7: Warning: Authentication failure. Retrying...
centos7: Warning: Authentication failure. Retrying...
centos7: Warning: Authentication failure. Retrying...
centos7: Warning: Authentication failure. Retrying...
centos7: Warning: Authentication failure. Retrying...
centos7: Warning: Authentication failure. Retrying...
centos7: Warning: Authentication failure. Retrying...
centos7: Warning: Authentication failure. Retrying...
centos7: Warning: Authentication failure. Retrying...
centos7: Warning: Authentication failure. Retrying...
centos7: Warning: Authentication failure. Retrying...
centos7: Warning: Authentication failure. Retrying...
centos7: Warning: Authentication failure. Retrying...
centos7: Warning: Authentication failure. Retrying...
centos7: Warning: Authentication failure. Retrying...
centos7: Warning: Authentication failure. Retrying...
centos7: Warning: Authentication failure. Retrying...
centos7: Warning: Authentication failure. Retrying...
centos7: Warning: Authentication failure. Retrying...
centos7: Warning: Authentication failure. Retrying...
Timed out while waiting for the machine to boot. This means that
Vagrant was unable to communicate with the guest machine within
the configured ("config.vm.boot_timeout" value) time period.
If you look above, you should be able to see the error(s) that
Vagrant had when attempting to connect to the machine. These errors
are usually good hints as to what may be wrong.
If you're using a custom box, make sure that networking is properly
working and you're able to connect to the machine. It is a common
problem that networking isn't setup properly in these boxes.
Verify that authentication configurations are also setup properly,
as well.
If the box appears to be booting properly, you may want to increase
the timeout ("config.vm.boot_timeout") value.
这是由错误 #7610 引起的,该错误已在 git 中修复。
您可以在等待新版本发布时自行应用修复,方法是编辑文件 vagrant/plugins/guests/linux/cap/public_key.rb
并应用错误报告中描述的以下更改:
diff -uNr vagrant-original/plugins/guests/linux/cap/public_key.rb vagrant/plugins/guests/linux/cap/public_key.rb
--- vagrant-original/plugins/guests/linux/cap/public_key.rb 2016-07-19 12:06:56.575045974 -0500
+++ vagrant/plugins/guests/linux/cap/public_key.rb 2016-07-19 12:07:34.303376009 -0500
@@ -54,6 +54,7 @@
if test -f ~/.ssh/authorized_keys; then
grep -v -x -f '#{remote_path}' ~/.ssh/authorized_keys > ~/.ssh/authorized_keys.tmp
mv ~/.ssh/authorized_keys.tmp ~/.ssh/authorized_keys
+ chmod 0600 ~/.ssh/authorized_keys
fi
rm -f '#{remote_path}'