首先,我意识到这是一条常见的错误消息,其中包含多种不同的原因和解决方案,但是到目前为止,我发现仍然没有任何工作。我有在Windows 10上运行的带有Virtualbox 5.2.18的Vagrant 2.1.5。
我当时正在用一个非常简单的Vagrantfile测试Vagrant:
Vagrant.configure("2") do |config|
config.vm.box = "centos/7"
end
运行vagrant up
然后给出典型的“等待机器启动时超时”错误:
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'centos/7'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'centos/7' is up to date...
==> default: Setting the name of the VM: vargrantTest_default_1537805339381_15444
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
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.
我尝试过的事情:
vb.gui = true
观看VM启动。它可以正常启动,并在登录屏幕上等待。VBoxManage showvminfo --machinereadable
会运行数百次,从而导致日志文件超过8万行。以及我忘记写下的其他几件事。我没有创意,对Vagrant还是陌生的,所以我真的不知道下一步解决问题的方法是什么。任何帮助将不胜感激。
编辑:不知道为什么我自己不想做,但是Marco给了我一个想法,尝试直接ssh到VM。我尝试使用Vagrant创建的“ /.vagrant.d/insecure_private_key”中的密钥文件来执行此操作,但是超时。然后,我尝试简单地对VM进行ping操作,但是这样做似乎混合了“请求超时”和“目标主机无法访问”的随机组合,因此在某个地方(我的机器,VM或Virtualbox)可能存在更大的网络问题不知道。
答案 0 :(得分:0)
您要为此盒子声明某种网络吗?可以是私人的,也可以是公共的,但是某物?
另外,您的启动超时时间是多长?付诸东流,给它900 => 1500万。