オフライン環境でもvagrantを使って開発がしたい
private_networkを使ってvagrant upしたらエラーが出たので、手順化しました。
The specified host network collides with a non-hostonly network!
This will cause your specified IP to be inaccessible. Please change
the IP or name of your host only network so that it no longer matches that of
a bridged or non-hostonly network.
検証環境
ホストOS:windows8.1
ゲストOS:CentOS
仮想化ツール:VirtualBox、Vagrant
ホストオンリーネットワークの作成
ファイル(F)→環境設定(P)→ネットワーク→ホストオンリーネットワーク(H)
→ホストオンリーネットワークの追加
VirtulBox Host-Only Ehthernet Adapterをダブルクリック
を設定
Vagrantfileの作成
ネットワークの設定はpublic_networkではなくprivate_networkを使います
ipアドレスは10.0.0.101にしました。
構築
ホストをオフラインに設定
右からシャッとだして、オフラインに設定します。
接続
無事接続できました。
参考URL
Leandro Facchinetti | Vagrant host-only network troubleshooting