Disable insert_key for boot2docker host

Vagrant >1.7 is unable to login to the default boot2docker host if it has
been halted and brought back up again.

This is because the insecure SSH keypair is replaced but boot2docker doesn't
persist filesystem changes between reboots. So when next brought up Vagrant
tries to use the new keypair which is no longer valid and subsequently isn't
able to login.

Prevent this from happening by disabling the `ssh.insert_key` option on
versions where it is available.
This commit is contained in:
Dan Carley 2015-01-08 10:32:40 +00:00
parent e1e192b90a
commit 7529b66ea2
1 changed files with 5 additions and 0 deletions

View File

@ -18,4 +18,9 @@ Vagrant.configure("2") do |config|
# b2d doesn't support NFS # b2d doesn't support NFS
config.nfs.functional = false config.nfs.functional = false
# b2d doesn't persist filesystem between reboots
if config.ssh.respond_to?(:insert_key)
config.ssh.insert_key = false
end
end end