我正在 Mac m1 上尝试vagrant up
三台 Ubuntu 20.04-arm64 服务器,并出现循环错误:
==> db: Waiting for machine to boot. This may take a few minutes...
db: SSH address: :22
db: SSH username: vagrant
db: SSH auth method: private key
db: Warning: Connection refused. Retrying...
app2: Warning: Connection refused. Retrying...
app1: Warning: Connection refused. Retrying...
db: Warning: Connection refused. Retrying...
app2: Warning: Connection refused. Retrying...
app1: Warning: Connection refused. Retrying...
db: Warning: Connection refused. Retrying...
流浪文件:
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# General Vagrant VM configuration.
config.vm.box = "jeffnoxon/ubuntu-20.04-arm64"
config.ssh.insert_key = false
config.vm.synced_folder ".", "/vagrant", disabled: true
config.vm.provider :parallels do |v|
v.memory = 256
v.linked_clone = true
end
# Application server 1.
config.vm.define "app1" do |app|
app.vm.hostname = "orc-app1.test"
app.vm.network :private_network, ip: "192.168.60.4"
end
# Application server 2.
config.vm.define "app2" do |app|
app.vm.hostname = "orc-app2.test"
app.vm.network :private_network, ip: "192.168.60.5"
end
# Database server.
config.vm.define "db" do |db|
db.vm.hostname = "orc-db.test"
db.vm.network :private_network, ip: "192.168.60.6"
end
end
可能出什么问题了?
答案1
也遇到了同样的问题,似乎与最近的盒子更新有关。我假设创建者已为每个盒子分配了相同的 mac 地址。当与并行一起使用时,这会强制每个盒子共享相同的 DHCP 地址,这似乎会破坏并行
修复方法是从 Box 版本 1.0.1 恢复并使用版本 1.0.0,直到作者修复重复的 MAC 地址问题
例如
config.vm.box = "jeffnoxon/ubuntu-20.04-arm64"
config.vm.box_version = "1.0.0"