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

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

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

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

Q&A

解決済

1回答

2433閲覧

vagrant upできない bridged or non-hostonly network.

tomo77777

総合スコア15

Vagrant

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

0グッド

0クリップ

投稿2018/09/01 16:27

vagrant up で仮想環境が立ち上がらなくなった

Laravel+homesteadで開発をし始めた初学者です。
vagrant upにより、いつも通り仮想環境を起動しました所、起動できなくなりました。
空港でWifiを利用し、利用終了後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. Bridged Network Address: '10.0.0.0' Host-only Network 'en0: Wi-Fi (AirPort)': '10.0.0.0'

アドレスが被っていてhostPCを正しく識別できない的な事なのでしょうか。
Host-only NetworkとBridge Network Addressを被らないように設定したいのですがどうすれば良いでしょうか。
vagrant upを、おまじないのように使用していた私には解決できそうに有りません。
よろしくお願いいたします。
以下、Vagrantfileの内容。

vagrantfile

1# -*- mode: ruby -*- 2# vi: set ft=ruby : 3 4require 'json' 5require 'yaml' 6 7VAGRANTFILE_API_VERSION ||= "2" 8confDir = $confDir ||= File.expand_path("vendor/laravel/homestead", File.dirname(__FILE__)) 9 10homesteadYamlPath = File.expand_path("Homestead.yaml", File.dirname(__FILE__)) 11homesteadJsonPath = File.expand_path("Homestead.json", File.dirname(__FILE__)) 12afterScriptPath = "after.sh" 13aliasesPath = "aliases" 14 15require File.expand_path(confDir + '/scripts/homestead.rb') 16 17Vagrant.require_version '>= 1.9.0' 18 19Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| 20 if File.exist? aliasesPath then 21 config.vm.provision "file", source: aliasesPath, destination: "/tmp/bash_aliases" 22 config.vm.provision "shell" do |s| 23 s.inline = "awk '{ sub(\"\r$\", \"\"); print }' /tmp/bash_aliases > /home/vagrant/.bash_aliases" 24 end 25 end 26 27 if File.exist? homesteadYamlPath then 28 settings = YAML::load(File.read(homesteadYamlPath)) 29 elsif File.exist? homesteadJsonPath then 30 settings = JSON.parse(File.read(homesteadJsonPath)) 31 else 32 abort "Homestead settings file not found in #{confDir}" 33 end 34 35 Homestead.configure(config, settings) 36 37 if File.exist? afterScriptPath then 38 config.vm.provision "shell", path: afterScriptPath, privileged: false, keep_color: true 39 end 40 41 if defined? VagrantPlugins::HostsUpdater 42 config.hostsupdater.aliases = settings['sites'].map { |site| site['map'] } 43 end 44end 45

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

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

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

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

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

guest

回答1

0

ベストアンサー

これで解決しないでしょうか?

投稿2018/09/01 17:05

退会済みユーザー

退会済みユーザー

総合スコア0

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

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

tomo77777

2018/09/01 22:15

解決しました! ありがとうございました!
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

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

ただいまの回答率
85.48%

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

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

質問する

関連した質問