Upon vagrant up, the guest box is getting assigned the wrong IP address and causing the following error:
...
...
SSH address: 127.0.0.1:2222
serverbox: SSH username: vagrant
serverbox: SSH auth method: private key
serverbox: Warning: Connection timeout. Retrying...
serverbox: Warning: Connection timeout. Retrying...
serverbox: Warning: Connection timeout. Retrying...
...
I do work at home and at the office so must always reconfigure the ip address assignment in Vagrantfile depending on where I am at because the subnets are different. (192.168.x.x versus 10.80.x.x)
This has worked fine until just yesterday. I have no idea what is causing the issues as I haven't made any adjustments.
Vagrantfile:
Vagrant.configure("2") do |config|
config.vm.provider "virtualbox" do |vb|
vb.customize ["modifyvm", :id, "--memory", "512"]
end
config.vm.network "public_network", ip: '10.80.2.144'
#config.vm.network "public_netowrk", ip: '192.168.1.144'
end
...
The Vagrantfile should put my guestbox on the 10.80.x.x address but netstat shows that my box is still going up on the 192.168.x.x address. This means I am unable to work with the guestbox since it is going to an out of bounds subnet.
I've done halt and up again as well as completely rebooting my cpu and checking to make sure virtualization is on in BIOS.
I've looked here and tried this method to no avail.
I also tried vb.gui = true but my machine is running headless. Virtualbox's Preview logging screen might provide some useful information but it is so small I can't make anything out of it. If someone has any advice on how to make that larger that could probably help a lot.
UPDATE:
So my solution is an undesired solution but my workday has been torpedoed and need to move forward so I just destroyed my box and re up'ed.
Apparently, my keys became insecure. Not sure how that happened but the new box replaced my keys.
my suggestion for your issue.
Run vagrant reload
and vagrant provision
on that instance after you changed IP.
If not get your problem fixed, try the second one:
change public_network to private_network
config.vm.network "private_network", ip: '10.80.2.144'
#config.vm.network "private_network", ip: '192.168.1.144'