From 7529b66ea2c90c4e0d787023e47f6912de081291 Mon Sep 17 00:00:00 2001 From: Dan Carley Date: Thu, 8 Jan 2015 10:32:40 +0000 Subject: [PATCH] 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. --- plugins/providers/docker/hostmachine/Vagrantfile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/providers/docker/hostmachine/Vagrantfile b/plugins/providers/docker/hostmachine/Vagrantfile index 752ba888d..79cd59f8c 100644 --- a/plugins/providers/docker/hostmachine/Vagrantfile +++ b/plugins/providers/docker/hostmachine/Vagrantfile @@ -18,4 +18,9 @@ Vagrant.configure("2") do |config| # b2d doesn't support NFS 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