0

I set up Vagrant yesterday to use Ubuntu and it was working perfectly. I used the vagrant ssh command to connect with the Ubuntu VM which was created automatically on VirtualBox.

Today I was trying to open it again but I wasn’t able to. When I did - vagrant up command in the directory of the Ubuntu folder, this was the output:

C:\Users\Djind\Documents\Vagrant\ubuntu>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'ubuntu/trusty64' version '20190514.0.0' 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: Forwarding ports...
    default: 22 (guest) => 2222 (host) (adapter 1)
==> 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 reset. Retrying...
    default: Warning: Connection aborted. Retrying...
    default: Warning: Remote connection disconnect. Retrying...
    default: Warning: Connection reset. Retrying...
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.

I then tried vagrant ssh directly and then this was the output:

C:\Users\Djind\Documents\Vagrant\ubuntu>vagrant ssh
ssh_exchange_identification: read: Connection aborted

Sometimes vagrant ssh command does not retrying a hundred times and instead prints this:

C:\Users\Djind\Documents\Vagrant\ubuntu>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'ubuntu/trusty64' version '20190514.0.0' is up to date...
==> default: There was a problem while downloading the metadata for your box
==> default: to check for updates. This is not an error, since it is usually due
==> default: to temporary network problems. This is just a warning. The problem
==> default: encountered was:
==> default:
==> default: Could not resolve host: vagrantcloud.com
==> default:
==> default: If you want to check for box updates, verify your network connection
==> default: is valid and try again.
==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> default: flag to force provisioning. Provisioners marked to run always will still run.

But then the vagrant ssh command gives this output:

C:\Users\Djind\Documents\Vagrant\ubuntu>vagrant ssh
ssh_exchange_identification: read: Connection reset

Please help.

4
  • I tried that, I does not return anything, Then if I do vagrant up again , I get the same issue in which it says retrying... Commented Dec 26, 2020 at 20:02
  • Once the vagrant halt command retuned:C:\Users\Djind\Documents\Vagrant\ubuntu>vagrant halt ==> default: Attempting graceful shutdown of VM... default: Guest communication could not be established! This is usually because default: SSH is not running, the authentication information was changed, default: or some other networking issue. Vagrant will force halt, if default: capable. ==> default: Forcing shutdown of VM... But then still the same retrying... issue when i run vagrant up Commented Dec 26, 2020 at 20:04
  • @Giacomo1968, I opened the vagrantfile on vs code and added the line of code here:i.sstatic.net/j38q2.png .... now when i run the vagrant up command, I get this - i.sstatic.net/XnxIQ.png . Please help . Thanks Commented Dec 27, 2020 at 13:23
  • That solved the new error but the retrying timeout error continued. Commented Dec 28, 2020 at 18:15

0

You must log in to answer this question.

Browse other questions tagged .