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的图像
检查LAN连接上的IP,并确保没有设备与VagrantFile上的IP相撞。 我遇到了这个错误,我在笔记本电脑的wifi上遇到了192.168.1.10
192.168.2.10
,以确保它不会与网络上的任何设备相撞。
我也有同样的挑战,并做了以下挑战以解决:
在VirtualBox,转到文件 - >主机网络管理器在此窗口中的IPv4地址记录。在您的VagrantFile中,使用保留的私有IPv4网络范围内的任何IP。假设您的VirtualBox IPv4地址是192.168.56.1/24。在您的Vagrantfile中,您可以添加
config.vm.network“ private_network”,ip:“ 192.168.56.5”
如果需要的话,请记住要配置您的
主机文件。
我在家工作时也有同样的问题,所以我对我所做的是:
Vagrantfile
我会根据我的位置发表评论/不注释。
# 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已修复
3。 重新加载盒,选择您正在使用wifi 现在您可以在本地网络中访问尖端!如果您要编辑配置文件中的地狱,而无效,请仔细检查您正在编辑
config.vm.network "private_network", ip: "192.168.1.1"
config.vm.network "public_network", ip: "192.168.1.1"
我做到了,我们都做了,不要像那样看我
我今天遇到这个问题。我发现的大多数解决方案都涉及更改
Homestead.yaml
。对于那些无法出于任何原因而无法做到这一点的人,这是我的解决方案:
可疑的网络设备
状态超过您早些时候失败的位置(对我来说是
Homestead.yaml.example
),启用了有问题的网络设备。
LET流浪者按照往常进行。这显然不是永久的解决方案,但它适合我们的需求。
在这个问题之前,我检查了我的IP,所以是10.1,我的宅基地在10.10上运行,我解决了此ISS