多个私有网络无所事事

时间:2018-08-29 04:20:10

标签: ssh timeout vagrant

我可以用一个专用网络创建一个盒子,但是当我添加多个专用网络时,它不会出现。

Vagrantfile:

Vagrant.configure("2") do |c|
  c.vm.box = "bento/centos-7.3"
  c.vm.box_url = ""
  c.vm.hostname = "default-centos-7.vagrantup.com"
    c.vm.network "public_network", bridge: "en0: Wi-Fi (AirPort)", ip: "192.100.2.10"
    c.vm.network(:private_network, {:ip=>"192.100.2.15"})
    c.vm.network(:private_network, {:ip=>"192.100.2.16"})
    c.vm.network(:private_network, {:ip=>"192.100.2.17"})
  end
  c.vm.synced_folder "../../../", "/vagrant"
  c.vm.provider :virtualbox do |p|
  end
end

它没有给出任何错误,但是在添加ssh密钥时超时。

==> 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
    default: Warning: Connection reset. Retrying...
    default: Warning: Remote connection disconnect. Retrying...
    default: Warning: Connection reset. Retrying...
    default: Warning: Remote connection disconnect. Retrying...
    default: Warning: Connection reset. Retrying...
    default: Warning: Remote connection disconnect. Retrying...
    default: Warning: Connection reset. Retrying...
    default: Warning: Remote connection disconnect. Retrying...
    default: Warning: Connection timeout. 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.

我在这里想念什么?

1 个答案:

答案 0 :(得分:0)

我将ips更改为10.x.x.x值,然后出现了。我不确定为什么流浪汉不能使用问题中提到的那些特定IP。