3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

localのVirtualBox(vagrant)にknife solo prepareできない。なんで?

Posted at

knife solo prepare

# knife solo prepare my_vagrant
Bootstrapping Chef...
ERROR: RuntimeError: Unable to connect to my_vagrant

うーん。prepareができない。

ssh-configがおかしい?

# vagrant ssh-config
Host default
  HostName 127.0.0.1
  User vagrant
  Port 2222
  UserKnownHostsFile /dev/null
  StrictHostKeyChecking no
  PasswordAuthentication no
  IdentityFile /<REPOSITORY>/.vagrant/machines/default/virtualbox/private_key
  IdentitiesOnly yes
  LogLevel FATAL

IdentityFileが変わってる!

~/.ssh/configを更新する

~/.ssh/config内のvagrantで使っていた場所を消してから、

# vagrant ssh-config --host my_vagrant >> ~/.ssh/config

まとめ

vagrantをアップデートしたらIdentityFileが変わったんだと思う。

# vagrant -v
Vagrant 1.7.3

vagrant sshはIdentityFileを変更する前から通っていた。

3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?