I was using Homestead and vagrant for Laravel, everything was working fine until this morming when I tried to up the machine and work. i'm getting this error :
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'laravel/homestead' is up to date...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports...
default: 80 (guest) => 8000 (host) (adapter 1)
default: 443 (guest) => 44300 (host) (adapter 1)
default: 3306 (guest) => 33060 (host) (adapter 1)
default: 5432 (guest) => 54320 (host) (adapter 1)
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
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.
If you look above, you should be able to see the error(s) that
Vagrant had when attempting to connect to the machine. These errors
are usually good hints as to what may be wrong.
If you're using a custom box, make sure that networking is properly
working and you're able to connect to the machine. It is a common
problem that networking isn't setup properly in these boxes.
Verify that authentication configurations are also setup properly,
as well.
If the box appears to be booting properly, you may want to increase
the timeout ("config.vm.boot_timeout") value.
Anyone can help me fix this issue without reinstalling all over again?
What I have tried :
it look like your vagrant has problem accessing your VM using the private-key:
vagrant ssh
--> if everything work well without having to enter password then the error is probably somewhere else (see the recommended setting using config.vm.boot_timeout
)
maybe your private-key is not in the known_hosts
list of you VM
2.1 back-up the private key in your workstation
a) As default, when using UBUNTU-OS, the file is located at ~/.vagrant.d/insecure_private_key
b) You can also run the command vagrant ssh-config
after vagrant up
, in order to retrieve the exact location of the private_key in use)
2.2 delete the file and restart vagrant
vagrant reload
or vagrant reload --provision
vagrant will try to regenerate a new private key for you.
According to the vagrantfile you have added: You should also configure the network similar to the following example (remove the # and check if the content of your vagrantfile look like the example bellow):
MY_IP_ADDRESS = '10.11.12.15'
Vagrant.configure(2) do |config|
config.vm.box = "base"
config.vm.network :private_network, ip: MY_IP_ADDRESS
config.ssh.forward_agent = true
end
example "hashicorp/precise64"
please check the vagrant-documentation @ https://www.vagrantup.com/docs/boxes.html