0
votes

I ran into the following error when I execute "vagrant up" command.

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.

Vagrant file:

Vagrant.configure("2") do |o|
o.vm.box="centos/7"
o.vm.network "private_network", ip: "192.168.1.13"
o.vm.provision "shell", :path=>"setup.sh"
end

setup.sh:

sudo yum -y update
sudo yum -y install vim,git,gedit,nmap
sudo systemctl restart httpd

Nothing is started but I see a machine in Virtual box and I double click and I start as usual. Could assign static IP but no network to outside world. Not sure where the things are going wrong.

Any help would be very much appreciated.

Thanks Jim

1

1 Answers

0
votes

I'm not sure I've seen that particular error before. However I do have some Vagrant (VirtualBox) VMs that use both a private network to talk to each other, and NAT to talk to the wider world.

I make sure these don't conflict by specifying different private IPv4 network ranges for each. For example:

Vagrant.configure(2) do |config|

    # host-only interface address
    config.vm.network "private_network", ip: "192.168.0.2"

    # NAT interface address range
    config.vm.provider "virtualbox" do |vb|
        vb.customize ["modifyvm", :id, "--natnet1", "172.16.0.0/12"]
    end
end