LoginSignup
5
9

More than 5 years have passed since last update.

Windows7にVagrantを導入 - 失敗した事

Posted at

はじめに

この記事はWindows7にVagrantを導入するにあたって失敗した事のまとめです。

Vagrantのインストール

Windows7の場合、インストールするバージョンについて注意が必要です。

現在(2017/12/16)時点で最新版は2.0.1となっているようです。
 →Download - Vagrant by HashiCorp
このバージョンだとWindows7の場合、vagrant initvagrant upなどでうんともすんとも言わなくなります。
どうやら、1.9.7にてWindows7での不具合があったようです。
 →[メモ]Windows7にvagrant 1.9.7 を入れても反応しなかった - Qiita
 →【vagrant】vagrant upで何も表示されず進まない現象の対処法 | 今さら始めるアフィリエイト ~nekomiblog~

以降のバージョンでも解決されていないのか、ともかくも記事を参考に次の場所から、1.9.6をダウンロードしてインストールしてみます。
 →Vagrant Versions | HashiCorp Releases

しかし、自分の環境ではうまく行きません。
いっその事マイナーバージョンを1つ下げて 1.8.6 にしてみた所、先に進むようになりました。

VirtualBoxインストール

通常はこちらから、最新版をダウンロードしてインストールするかと思います。
Downloads – Oracle VM VirtualBox
image.png

しかし、Vagrantのバージョンにより、vagrant up時に、対応するVirtualBoxのバージョンのインストールが行なわれます。
今回のケースの場合、5.0.10がダウンロードされてきます。

コマンドプロンプト
>vagrant up
==>  Provider 'virtualbox' not found. We'll automatically install it now...
     The installation process will start below. Human interaction may be
     required at some points. If you're uncomfortable with automatically
     installing this provider, you can safely Ctrl-C this process and install
     it manually.
==>  Downloading VirtualBox 5.0.10...
     This may not be the latest version of VirtualBox, but it is a version
     that is known to work well. Over time, we'll update the version that
     is installed.
     Progress: 100% (Rate: 7020k/s, Estimated time remaining: --:--:--)
==>  Installing VirtualBox. This will take a few minutes...
     A couple pop-ups will occur during this installation process to
     ask for admin privileges as well as to install Oracle drivers.
     Please say yes to both. If you're uncomfortable with this, please
     install VirtualBox manually.

この状態で反応が無いので、止めてからダウンロードされてきたファイル(VirtualBox-5.0.10-r104061-MultiArch_amd64.msi)を直接実行してインストールします。

default: SSH auth method: private keyで止まる

この問題はかなり多いようですね。
多くの場合次のポイントになるようです。

・VirtualBoxの設定でケーブル接続されていない扱いとなっている
 →"vagrant up"したら"SSH auth method: private key"で止まった話 - Qiita

・BIOS設定で仮想化機能が有効になっていない
 →仮想化支援機構(VT-x/AMD-V)を有効化できません | Futurismo

・SSH鍵関連の問題
 →vagrant upでprivate keyより先に進まない症状(10/25追記あり) - すごくねむい

そして・・・ 選択したBoxに問題がる(自分の環境と合わない?)

自分のケースの場合、boxが悪かったようです。
まず次のサイトに行きました。
 →Discover Vagrant Boxes - Vagrant Cloud

そしてcentosで検索して出てきたものの内、bentoがいいみたいな話を目にしていたので、その中で新しいbento_centos-7.2を使うことにして、vagrant init bento_centos-7.2しました。
そして、vagrant upで止まったという状況です。
あれこれうまく行かずに、改めて記事を参考にしつつ進めていた際にcentos6-7で実施したらすんなりと起動したので。

その他参考にした記事など

5
9
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
5
9