Page MenuHomePhabricator

Vagrant SSH occasionally fails after bringing up
Open, LowPublic

Description

$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'debian/contrib-jessie64' is up to date...
==> default: A newer version of the box 'debian/contrib-jessie64' is available! You currently
==> default: have version '8.7.0'. The latest is version '8.8.0'. Run
==> default: `vagrant box update` to update.

==> default: Clearing any previously set forwarded ports...
==> default: Fixed port collision for 22 => 2222. Now on port 2200.
==> 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: 10241 (guest) => 10241 (host) (adapter 1)
    default: 443 (guest) => 11241 (host) (adapter 1)
    default: 22 (guest) => 2200 (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:2200
    default: SSH username: vagrant
    default: SSH auth method: private key
[hangs forever while trying to connect to the box]

Subsequent vagrant up commands seem to works (because they do not involve an SSH connection) but don't actually do anything. vagrant ssh hangs while trying to connect. I confirmed by running sshd in debug mode on the guest that it's a network problem, not an sshd problem.

Occurs fairly often but a simple vagrant reload fixes it so it's not too annoying but will probably scare away newbies from vagrant.