dergachev/vagrant-vbox-snapshot

vagrant fails to connect after "vagrant package && vagrant snapshot go"

Opened this issue · 2 comments

    default: SSH address: 127.0.0.1:22
    default: SSH username: vagrant
    default: SSH auth method: private key
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...

Vagrant is trying to connect to my own ssh server and fails to authenticate (thankfully :P)

The reason for this is that the port forward is removed by vagrant package and not restored by vagrant snapshot go.

Can you make it so vagrant snapshot go restores the forwards set up in the vagrantfile plus the default ssh forward?
I bet there is some kind of post-boot action or something in vagrant that you can trigger.

Workaround: after packaging, do vagrant up --no-provision and then vagrant snapshot go

I'll think about this, not sure yet.