Vagrant ssh is very very slow to connect

Hi, so after I provision the vm, vagrant ssh takes about 4-5 minutes to connect.
If I use a very basic vm:

 $ vagrant init hashicorp/precise64
 $ vagrant up

Then ssh is super fast… not sure if this is relevant as this is the first time I’ve used anything like this.
Any help please?
Thanks!

(Also just a note, that it is not slow due to booting, it is slow even when the machine has been running and is booted…
Probably worth a further note that I am running the vagrant VM on an Azure VM, for… reasons. I’m hoping that it is possible with this set up, as it will be impossible to download the required software on to my physical machine.)

Hi @Jennifer_59877,

Please check the following links for slow vagrant ssh:

It is recommended to provision vagrant while bringing up the Vagrant Environment to automatically install all softwares and configurations. Please follow the steps below:

  • If you are already connected to the vagrant environment, you can exit it using the command:
    vagrant@mXXX:~ exit

  • Outside the vagrant environment, use the following command to destroy vagrant:
    mXXX-vagrant-env$ vagrant destroy

  • Then, you can bring up the vagrant environment and provision Vagrant (to download datasets, validation scripts, etc.):
    m103-vagrant-env$ vagrant up --provision

  • Once the environment is provisioned, we can connect with ssh:
    m103-vagrant-env$ vagrant ssh

  • If you need to re-download validation scripts, run the following command (from Vagrant):
    vagrant@m103:~$ download_validators

I hope it helps!!

Please let me know, if you have any questions.

Thanks,
Sonali

1 Like