The failure reason:
vagrant ssh-config on the base provisioned box(hashicorp/precise32) loads the identity file from .vagrant directory of the project
But the packaged box that is failing loads it from
The source box use the insecure key
by default the actual version of vagrant will remove it, to make it secure
the new box, use a generated pair key.. that is not being used anymore
vagrant can’t connect to the new box.
wget https://raw.githubusercontent.com/mitchellh/vagrant/master/keys/vagrant.pub -O .ssh/authorized_keys chmod 700 .ssh chmod 600 .ssh/authorized_keys chown -R vagrant:vagrant .ssh
Then when building the base box I think you need to add the
config.ssh.insert_key = false to your Vagrantfile. If you built a new version of the box you can simply do a
vagrant box update otherwise you can remove and re-add the box to get the newest box.
(You may need to add config.ssh.insert_key = false in the new Vagrantfile of the customized box generated from the base box)