Fix Host Network Collision – How to Resolve Vagrant and VirtualBox Error

macnetworkingvagrantvirtuaboxvirtualization

Below is the error:

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: '192.168.1.0'
Host-only Network 'en0: Wi-Fi (Wireless)': '192.168.1.0'

after running vagrant up command from folder with below config in ../utils/vagrant_defaults.rb:

GUI     = false
RAM     = 512
DOMAIN  = ".prom.inet"
NETWORK = "192.168.1."
NETMASK = "255.255.255.0"
BOX     = 'bento/ubuntu-18.04'

On my laptop ip addr gives below ip:

$ ip addr
    en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500  
         inet 192.168.1.64/24 brd 192.168.1.255 en0

vagrant up launches 3 VM's using Oracle virtual box in the virtual network within laptop in subnet 192.168.1.0(because my laptop is in that subnet)

  1. What is host network?

  2. What is non-host network?

  3. How to resolve this error? Why cannot host IP network match with non-host network?

Best Answer

Change the Host Only network IP range. Host only is for host use only and not the outside world.

Bridged networking is for unfettered Internet access by the guest.

Change VBOX host only IP

Host-only Networking

In this mode, communication between connected guest systems and the host system is possible.[7]

Customized network interfaces will be used on the host system for the host-only network, such as: vboxnet0. The IP address on the host as well as the DHCP server for this network will be configured directly in VirtualBox:

  1. Select Global Settings from the File menu

  2. Select the Network item in the list on the left and then right-click on the tool icon.

  3. The IP address for the host can now be changed in this host-only network

  4. After clicking on the DHCP Server tab, the DHCP server settings can be changed

Related Question