Vagrant giving me issues when I try to use on WSL2 with Warning: Connection refused. Retrying

Viewed 436

I'm so close to booting up my instances to test Vagrant on WSL2 but I continue to run into this issue where when I run vagrant up it gives me the following error:

app1: SSH address: 127.0.0.1:2200
app1: SSH username: vagrant
app1: SSH auth method: private key
app1: Warning: Connection refused. Retrying...
app1: Warning: Connection refused. Retrying...
app1: Warning: Connection refused. Retrying...

Here is my Vagrantfile code:

# -*- mode: ruby -*-
# vi: set ft=ruby :

VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.box = "generic/ubuntu1804"
  config.ssh.forward_agent = true
  config.ssh.forward_agent = true
  config.vm.synced_folder ".", "/vagrant", disabled: true
  config.vm.provider :virtualbox do |v|
    v.memory = 512
    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

I removed rm insecure_private_keyand ran vagrant upso it can recreate the insecure_private_key but the error still persists.

Would appreciate any help on this. Feel like moving completely to Linux :)

0 Answers
Related