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

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

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

VirtualBoxは、現在米オラクル社が開発している、 x86仮想化ソフトウェア・パッケージの一つです。

Vagrant

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

Q&A

解決済

1回答

3576閲覧

WindowsにVagrantを入れてvagrant upをするとWarning: Remote connection disconnect. Retrying...になってしまう

singlestroke

総合スコア68

VirtualBox

VirtualBoxは、現在米オラクル社が開発している、 x86仮想化ソフトウェア・パッケージの一つです。

Vagrant

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

0グッド

0クリップ

投稿2016/06/14 12:22

dotinstallの下記lessonを参考にVirtualBox、Vagrantのインストールをしてみたのですが、表題のようなエラーが大量に表示されます。

http://dotinstall.com/lessons/basic_localdev_win

■インストールしたもの
・VirtualBox-5.0.20-106931-Win.exe
・vagrant_1.7.4.msi

■事象
PuTTYで、./run.sh コマンドでCentOSの設定まではできました。
その後PuTTYをログアウト、コマンドプロンプトでvagrant suspendを実行して終了し、コマンドプロンプトもexitで終了
→再度コマンドプロンプトを起動して対象フォルダに移動しvagrant upを実行すると下記のようになります。

command

1C:\Users\UserName\MyVagrant\mycentos>vagrant up 2Bringing machine 'default' up with 'virtualbox' provider... 3==> default: Checking if box 'bento/centos-6.7' is up to date... 4==> default: Resuming suspended VM... 5==> default: Booting VM... 6==> default: Waiting for machine to boot. This may take a few minutes... 7 default: SSH address: 127.0.0.1:2222 8 default: SSH username: vagrant 9 default: SSH auth method: private key 10 default: Warning: Remote connection disconnect. Retrying... 11 default: Warning: Remote connection disconnect. Retrying... 12 default: Warning: Remote connection disconnect. Retrying... 13 default: Warning: Remote connection disconnect. Retrying... 14 default: Warning: Remote connection disconnect. Retrying... 15 default: Warning: Remote connection disconnect. Retrying... 16 default: Warning: Remote connection disconnect. Retrying... 17 default: Warning: Remote connection disconnect. Retrying... 18 default: Warning: Remote connection disconnect. Retrying... 19 default: Warning: Remote connection disconnect. Retrying... 20 default: Warning: Remote connection disconnect. Retrying... 21 default: Warning: Remote connection disconnect. Retrying... 22 default: Warning: Remote connection disconnect. Retrying... 23 default: Warning: Remote connection disconnect. Retrying... 24 default: Warning: Remote connection disconnect. Retrying... 25 default: Warning: Remote connection disconnect. Retrying... 26 default: Warning: Remote connection disconnect. Retrying... 27 default: Warning: Remote connection disconnect. Retrying... 28 default: Warning: Remote connection disconnect. Retrying... 29 default: Warning: Remote connection disconnect. Retrying... 30 default: Warning: Remote connection disconnect. Retrying... 31 default: Warning: Remote connection disconnect. Retrying... 32 default: Warning: Remote connection disconnect. Retrying... 33 default: Warning: Remote connection disconnect. Retrying... 34 default: Warning: Remote connection disconnect. Retrying... 35 default: Warning: Remote connection disconnect. Retrying... 36 default: Warning: Remote connection disconnect. Retrying... 37 default: Warning: Remote connection disconnect. Retrying... 38 default: Warning: Remote connection disconnect. Retrying... 39Timed out while waiting for the machine to boot. This means that 40Vagrant was unable to communicate with the guest machine within 41the configured ("config.vm.boot_timeout" value) time period. 42 43If you look above, you should be able to see the error(s) that 44Vagrant had when attempting to connect to the machine. These errors 45are usually good hints as to what may be wrong. 46 47If you're using a custom box, make sure that networking is properly 48working and you're able to connect to the machine. It is a common 49problem that networking isn't setup properly in these boxes. 50Verify that authentication configurations are also setup properly, 51as well. 52 53If the box appears to be booting properly, you may want to increase 54the timeout ("config.vm.boot_timeout") value.

さらにこの後すぐにvagrant upを実行すると下記のように表示されます。

command

1C:\Users\UserName\MyVagrant\mycentos>vagrant up 2Bringing machine 'default' up with 'virtualbox' provider... 3==> default: Checking if box 'bento/centos-6.7' is up to date... 4==> default: VirtualBox VM is already running.

最後に
==> default :Machine booted and ready!
と表示され正常に起動させるにはどのようにしたらよいのでしょうか。

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

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

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

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

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

guest

回答1

0

ベストアンサー

VMをきちんと終了せず vagrant suspend したままコマンドプロンプトもexitしてしまったのがいけないのです。
vagrant suspend は終了ではなく一時停止(スリープ)なので、プロセスは起動したままです。

一旦、vagrant destroy でプロセスを破棄してから、再度 vagrant up してみてください。

投稿2016/06/14 14:48

pi-chan

総合スコア5936

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

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

singlestroke

2016/06/15 00:51 編集

コマンドプロンプトを起動してvagrant destroyし、その後vagrant upしたのですが ===== default: Warning: Remote connection disconnect. Retrying... ===== の後に下記のように表示されます。 ===== default: default: Vagrant insecure key detected. Vagrant will automatically replace default: this with a newly generated keypair for better security. default: default: Inserting generated public key within guest... default: Removing insecure key from the guest if it's present... default: Key inserted! Disconnecting and reconnecting using new SSH key... ==> default: Machine booted and ready! ==> default: Checking for guest additions in VM... ==> default: Configuring and enabling network interfaces... ==> default: Mounting shared folders... default: /vagrant => C:/Users/UserName/MyVagrant/mycentos ===== 何度vagrant destroy、vagrant upをやってもこうなるのですが。。。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

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

ただいまの回答率
85.50%

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

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

質問する

関連した質問