###環境
・OS:windows10 64bit
・ハード:LENOVO
→BIOS:E0CN47WW
→CPU:intel Celeron CPU 3215U 1.7GHz
・Vagrant Ver 1.9.4
・VM VirtualBox 5.1.22
・SSH接続:PuTTY
・セキュリティソフト:avast
###前提・実現したいこと
vagrant で仮想環境を構築しておりましたが
PuTTYでのSSH接続がうまくいきません。
調べていくと、公開鍵・秘密鍵の設定であること
vagrant 1.7以降は毎回生成がされることまでは理解できましたが
ネットの情報をもとに試しても接続・設定ができませんでした。
■したいこと
①SSH接続がちゃんとできるようにしたい
②鍵を毎回設定しなくても起動ができるようにしたい
###発生している問題・エラーメッセージ
「vagrant up 」時に以下のメッセージが表示されます。
==> default: Attempting graceful shutdown of VM... default: Guest communication could not be established! This is default: SSH is not running, the authentication information was default: or some other networking issue. Vagrant will force hal default: capable. ==> default: Forcing shutdown of VM... ==> default: Clearing any previously set forwarded ports... ==> default: Clearing any previously set network interfaces... ==> default: Preparing network interfaces based on configuration... default: Adapter 1: nat ==> default: Forwarding ports... default: 22 (guest) => 2222 (host) (adapter 1) ==> default: Booting VM... ==> default: Waiting for machine to boot. This may take a few minut default: SSH address: 127.0.0.1:2222 default: SSH username: vagrant default: SSH auth method: private key Timed out while waiting for the machine to boot. This means that Vagrant was unable to communicate with the guest machine within the configured ("config.vm.boot_timeout" value) time period. If you look above, you should be able to see the error(s) that Vagrant had when attempting to connect to the machine. These errors are usually good hints as to what may be wrong. If you're using a custom box, make sure that networking is properly working and you're able to connect to the machine. It is a common problem that networking isn't setup properly in these boxes. Verify that authentication configurations are also setup properly, as well. If the box appears to be booting properly, you may want to increase the timeout ("config.vm.boot_timeout") value.
###試したこと
1.ドットインストールの以下のサイトから環境を構築しましたが
起動できず(起動はしていたかもしれません)
http://dotinstall.com/lessons/basic_localdev_win_v2/38605
2.起動時にエラーが出てきたので、ネットで検索すると
公開鍵・秘密鍵の生成が必要とのことでしたので
「vagrant ssh-config」で鍵のありかを確認し、private_keyの生成を行いました。
PS C:\MyVagrant\test0511> vagrant ssh-config Host default HostName 127.0.0.1 User vagrant Port 2222 UserKnownHostsFile /dev/null StrictHostKeyChecking no PasswordAuthentication no IdentityFile C:/Users/(PC名)/.vagrant.d/insecure_private_key IdentitiesOnly yes LogLevel FATAL
ssh
1
こちらで、vagrant は起動できましたがPuTTYでSSH接続を試しても
ネットワークエラーで起動できませんでした。
3.PuTTYのIP設定、SSH設定を変更
ドットインストールではIPを「192.168.33.10」に指定と記載されておりましたが起動できず、
再度ネットで検索したところ、「vagrant ssh-config」で調べたときの
IP設定が必要とのことでしたので、「127.0.0.1(ポート:2222)」で試しましたがエラーが出てきました。
PuTTYgem でSSHの鍵も指定してみましたが、それでも接続できませんでした。
おそらく、vagrant が起動時に鍵を変更する影響があったのかとは思います。
4.SSH用の鍵が切り替わることを知り、設定を試す
SSH用の鍵が変わってしまうことを確認したのち、まずは切り替わらないようにまずは設定をしようとしましたが、
設定を投げ込むファイルが見当たりません。
参考URL①:http://a3no.hatenablog.com/entry/2013/06/22/002250
参考URL②:http://dqn.sakusakutto.jp/2013/08/windows_vagrant_ssh.html
参考URL③:http://qiita.com/Esfahan/items/e5f707dc6d116c2cc751
作業用フォルダは「C:\MyVagrant\test0511」で行っており、
その中に「.ssh」フォルダが自動生成されると思っておりましたが
そのフォルダが見当たりませんでした。
SSHの鍵が設定されていたユーザーファイルのほうも確認してみましたが見当たらず
Cドライブ直下のvagrant 実行フォルダものぞいてみましたが
わかりませんでした。
確認した場所:C:\HashiCorp\Vagrant\embedded\gems\gems\vagrant-1.9.4
おそらく、SSHの鍵設定ができれば起動ができるのではないかとは思うのですが
そこから先がわからず、質問させていただきました。
vagrant の設定ファイルへkeyを入力する方法も試してみたのですが
こちらもできませんでした。
(毎回起動のときに鍵が変わっているせいかとは思っています)
###補足情報(言語/FW/ツール等のバージョンなど)
BIOSの仮想設定はONにしております。
CPUが未対応なのかと思いましたが、インテルのサイトでは可能と記載されておりました。
間違いであれば申し訳ありません。
また、ドットインストールを参考にavastの設定も行っております。
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。