LoginSignup
9
9

More than 5 years have passed since last update.

Windows10 + VirtualBox + Vagrant + Homestead2.0 を動かす。

Posted at

Windows10 環境上でVirtualBox 5.0.0を使おうとすると、現在エラーが発生して VagrantゲストOSが起動しない状態となっています。

VirtualBox5.0.0 を削除

2015/08/07 現在 Windows10 に正式にリリースされている最新ヴァージョンですが、これを削除します。

VirtualBox5.0.1(TestBuild)をインストール

私は https://www.virtualbox.org/download/testcase/VirtualBox-5.0.1-101902-Win.exe をインストールしました。
(既にもっと新しい TestBuild も存在します。)

Homestead.rb を編集

17行目
    config.vm.network :private_network, ip: settings["ip"] ||= "192.168.10.10"
    
    # config.vm.network :private_network, ip: settings["ip"] ||= "192.168.10.10"

action.rb を編集

C:\HashiCorp\Vagrant\embedded\gems\gems\vagrant-1.7.4\plugins\providers\virtualbox 配下にある、action.rb を編集

64行目
          b.use ClearNetworkInterfaces
          
          #####b.use ClearNetworkInterfaces

VirtualBox の設定を変更

  1. Oracle VM VirtualBox マネージャを起動
  2. ファイル > 環境設定 を選択し ネットワーク > ホストオンリーネットワーク > [任意の VirtualBox Host-Only Ethernet Adapter ]を編集
  3. IP に192.168.10.10 を設定
  4. VM一覧から homestead の仮想OSを選択し、設定 > ネットワーク > アダプター2 へ編集
  5. ネットワークアダプターを有効化
  6. 割り当てをホストオンリーアダプター
  7. 名前を(2)で編集したホストオンリーネットワークを選択

Homestead 再起動など

$ homestead up
$ homestead provision

起動確認

以上の操作で Windows10 環境でも Homestead 起動時にエラーが出ることなく立ち上がり、HTTPのポートフォワード側のネットワークアダプターも有効になります。

9
9
1

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