Vagrant network collides with a non-hostonly network

前端 未结 5 1107
陌清茗
陌清茗 2021-02-18 23:53

I am trying to get a vagrant box up and running, but I keep getting network collide errors. This box is a fresh download of trusty64. I have been searching every file and folder

相关标签:
5条回答
  • 2021-02-19 00:25

    I had the same challenge, and did the following to solve it:

    In VirtualBox, go to File -> Host Network Manager

    Take note of the IPv4 address in this window. In your Vagrantfile, use any IP in the reserved private IPv4 network range. Let's say your VirtualBox IPv4 address is 192.168.56.1/24. In your Vagrantfile you could then add

    config.vm.network "private_network", ip: "192.168.56.5"

    Remember to configure your hosts file accordingly, should that be required.

    0 讨论(0)
  • 2021-02-19 00:25

    I resolve this connection, by disconnecting with internet, then run vagrant up. Once vagrant done its processing so i connect again.

    Before this issue, i checked my ip, so it was 10.1 and my homestead is running on 10.10 and i resolved this iss

    0 讨论(0)
  • 2021-02-19 00:26

    1. in homestead.rb find

    Configure A Private Network IP config.vm.network :private_network, ip: settings["ip"] ||= "192.168.10.10"

    because ip is fixed

    2. To set your own ip config.vm.network :public_network, ip: settings["ip"] ||= "192.168.1.234", :bridge => 'your own IP'

    3. reload box and choose you are using WIFI now you can access in the local network

    0 讨论(0)
  • 2021-02-19 00:31

    Check the IP you have on your LAN connection and make sure no devices are colliding with the IP on your Vagrantfile.

    I got this error and I had 192.168.1.2 on my laptop's wifi and I was setting 192.168.1.10 on my Vagrantfile. So I changed the IP on my Vagrantfile to 192.168.2.10 to make sure it won't collide with any device on my network.

    0 讨论(0)
  • 2021-02-19 00:33

    I had the same issue when I was working from home so what I did on my Vagrantfile was:

    # app.vm.network :private_network, ip: '10.0.0.07' # work
      app.vm.network :private_network, ip: '192.168.56.77' # home
    

    and I comment/uncomment depending on where I am.

    0 讨论(0)
提交回复
热议问题