文网络与非托管网络碰撞

问题描述 投票:0回答:7
我正在尝试使一个流浪汉启动并运行,但是我一直让网络碰撞错误。这个盒子是Trusty64的新下载。我一直在搜索与Vagrant打交道的每个文件和文件夹,试图找到一些我不能指定IP的东西。我正在Windows 7机器上运行流浪汉。这是我的vagrantfile:

C:\ users \ .vagrant oxes ... \vagrantfile

Vagrant::Config.run do |config| # This Vagrantfile is auto-generated by 'vagrant package' to contain # the MAC address of the box. Custom configuration should be placed in # the actual 'Vagrantfile' in this box. config.vm.base_mac = "0800278493DB" end # Load include vagrant file if it exists after the auto-generated # so it can override any of the settings include_vagrantfile = File.expand_path("../include/_Vagrantfile", __FILE__) load include_vagrantfile if File.exist?(include_vagrantfile)
这是我从Vagrant UP命令中收到的错误:

Bringing machine 'default' up with 'virtualbox' provider... ==> default: Clearing any previously set network interfaces... 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.
我如何在虚拟盒上获取IP不要碰撞?

update

我的Vagrantfile

的图像

Vagrantfile

检查LAN连接上的IP,并确保没有设备与VagrantFile上的IP相撞。 我遇到了这个错误,我在笔记本电脑的wifi上遇到了
vagrant virtualbox
7个回答
33
投票
,我在vagrantfile上设置了

192.168.1.10

。因此,我将VagrantFile上的IP更改为

192.168.2.10

,以确保它不会与网络上的任何设备相撞。
    
我也有同样的挑战,并做了以下挑战以解决:
在VirtualBox,转到文件 - >主机网络管理器

在此窗口中的IPv4地址记录。在您的VagrantFile中,使用保留的私有IPv4网络范围内的任何IP。假设您的VirtualBox IPv4地址是192.168.56.1/24。在您的Vagrantfile中,您可以添加

11
投票

config.vm.network“ private_network”,ip:“ 192.168.56.5”

如果需要的话,请记住要配置您的

主机

文件。

我在家工作时也有同样的问题,所以我对我所做的是:

Vagrantfile

我会根据我的位置发表评论/不注释。


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

,而是效果很好。我检查了没有IP冲突。


1。 在homestead.rbfind
configure一个私人网络ip config.vm.network:private_network,ip:settings [“ ip”] || =“ 192.168.10.10”

由于IP已修复

1
投票
2。 设置自己的IP config.vm.network:public_network,ip:settings [“ ip”] || =“ 192.168.1.234”,:bridge =>'您自己的ip'

3。
重新加载盒,选择您正在使用wifi
现在您可以在本地网络中访问
    
尖端!如果您要编辑配置文件中的地狱,而无效,请仔细检查您正在编辑

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

0
投票
config.vm.network "public_network", ip: "192.168.1.1"

我做到了,我们都做了,不要像那样看我

我今天遇到这个问题。我发现的大多数解决方案都涉及更改

Homestead.yaml

。对于那些无法出于任何原因而无法做到这一点的人,这是我的解决方案:

可疑的网络设备

0
投票
run

状态超过您早些时候失败的位置(对我来说是

Homestead.yaml.example
),启用了有问题的网络设备。
LET流浪者按照往常进行。

这显然不是永久的解决方案,但它适合我们的需求。


0
投票

在这个问题之前,我检查了我的IP,所以是10.1,我的宅基地在10.10上运行,我解决了此ISS

    

最新问题
© www.soinside.com 2019 - 2024. All rights reserved.