身份验证失败。正在重试...在Vagrantfile在使用自定义创建箱
问题描述:
我用下面的命令来打包VM,身份验证失败。正在重试...在Vagrantfile在使用自定义创建箱
vagrant package --base VMID —-output builder.box
我Vagrantfile如下所示,
box = "centos/7"
prefix_ip_addr = "174.10.10."
Vagrant.configure("2") do |config|
config.vm.box = box
builder_ip = "%s100" % [prefix_ip_addr]
config.ssh.forward_agent = true
config.ssh.insert_key = false
config.vm.define :builder do |builder|
# Setup builder VM and IP
builder.vm.hostname = "builder"
builder.vm.network :private_network, ip: builder_ip
# Setup builder VM system requirements
builder.vm.provider "virtualbox" do |v|
v.memory = 1024 * 16
v.cpus = 8
v.customize ["modifyvm", :id, "--natdnshostresolver1","on"]
v.customize ["modifyvm", :id, "--natdnsproxy1", "on"]
end
end
end
然后我用创建的框最多另一台机器,那Vagrantfile看起来像如下,
Vagrant.configure("2") do |config|
config.ssh.forward_agent = true
config.vm.define :builder1 do |builder|
builder.vm.box = "package.box"
end
end
但我收到此错误,
builder1: Warning: Authentication failure. Retrying...
builder1: Warning: Authentication failure. Retrying...
builder1: 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.
请帮我解决这个错误很长时间了。 。:(
答
我知道这是很老,但我刚开始与流浪者自己,就遇到了这个问题,对于那些谁也可以在这里找到自己,我只是增加了以下我Vagrantfile:
config.vm.boot_timeout = 60
对于op,我可能还会检查是否需要设置config.ssh.username和config.ssh.password指令。
明天告诉我,我会尽力提供帮助。 –