質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.50%
Vagrant

Vagrantは、VirtualBox上の仮想マシンを コマンドラインから作成してくれるソフトウェアです。 ビルド環境など容易に構築が可能です。

Q&A

1回答

2317閲覧

Vagrant up時に default: SSH auth method: private key で止まってしまう

退会済みユーザー

退会済みユーザー

総合スコア0

Vagrant

Vagrantは、VirtualBox上の仮想マシンを コマンドラインから作成してくれるソフトウェアです。 ビルド環境など容易に構築が可能です。

0グッド

0クリップ

投稿2018/08/15 02:09

編集2022/01/12 10:55

RHEL6上にVirtualBOXでCentOS7環境を作り、vagrantでBOX化しました。
このBOXをToolVM01という名前でvagrant box addし、vm01というフォルダでvagrant init ToolVM01後、vagrant upしたところ

default: SSH username: vagrant

default: SSH auth method: private key
default: Warning: Connection reset. Retrying...
default: Warning: Remote connection disconnect. Retrying...
default: Warning: Connection reset. Retrying...
default: Warning: Remote connection disconnect. Retrying...

と出て、最終的には起動しました。

次に先に作成したBOXをToolVM02という名前でvagrant box addしました。
元ネタが同じ環境が2つvagrantに登録されたことになります。
vagrant box listでも

ToolVM01 (virtualbox, 0)
ToolVM02 (virtualbox, 0)

と表示されました。

ここまで確認し、一旦、ToolVM01をvagrant haltで停止させました。

今度はvm02というフォルダを切り、そこでvagrant init ToolVM02後にvagrant upしたところ、最初のToolVM01と同じ

default: Warning: Connection reset. Retrying...

default: Warning: Remote connection disconnect. Retrying...
default: Warning: Connection reset. Retrying...
default: Warning: Remote connection disconnect. Retrying...

と、でることを期待したのですが、

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.

とエラーになってしまいます。
同じBOXファイルを使ったのに挙動が違うのは何か指定を変えるとかしなおす必要があるのでしょうか?

・最初に起動できたToolVM01のVagrantfileをコピーしてみたりもしましたが、挙動は変わりませんでした。

・他事例を参考に.ssh下も確認しましたが、秘密鍵ファイルはありました。
rw属性も600が設定されています。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

ssasaki

2018/09/27 02:25

vm01,vm02の2つが存在する現在の状態で、vm01の方は以前と同様に vagrant up で立ち上がるのでしょうか?
guest

回答1

0

Qiita - Vagrant box 作成手順(CentOS 7.4) に詳しい手順があるので行った手順と比較してみてはいかがでしょうか?

投稿2018/09/26 19:04

euledge

総合スコア2404

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだベストアンサーが選ばれていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.50%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問