Vagrant Up (private_network) Error : default: Warning: Connection aborted. Retrying

23 views
Skip to first unread message

Jack Yee

unread,
Apr 28, 2018, 7:05:57 PM4/28/18
to Vagrant

I have the following Vagranfile. When I vagrant up, I'm getting the following error. However, if I switch to use a config.vm.network "public_network", everything works fine.

But I still want to use config.vm.network "private_network" so I can assign fixed IP address for development.


[Error]

    default: Adapter 2: hostonly
==> default: Forwarding ports...
    default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> 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
    default: Warning: Connection aborted. Retrying...
    default: Warning: Connection aborted. Retrying...


[Vagrantfile]

Vagrant.configure("2") do |config|
  config.vm.box = "pef"

  config.vm.network "private_network", ip: "192.168.33.12"
  #config.vm.network "public_network"

  config.vm.synced_folder "C:/Users/user1/myprj", "/home/vagrant"

  config.vm.provider "virtualbox" do |vb|
     # Display the VirtualBox GUI when booting the machine
     vb.gui = true

     # Customize the amount of memory on the VM:
     vb.memory = "1024"

     # For host-only adapter
     vb.customize ["modifyvm", :id, "--uartmode1", "disconnected" ]
     vb.customize ["modifyvm", :id, "--nictype1", "Am79C973"]
     vb.customize ["modifyvm", :id, "--nictype2", "Am79C973"]
  end
end
vagrant.PNG
Reply all
Reply to author
Forward
0 new messages