Vagrant 网络与非 Hostonly 网络发生冲突

2023-12-31

我正在尝试启动并运行一个流浪盒子,但我不断收到网络冲突错误。这个盒子是trusty64的全新下载。我一直在搜索与 vagrant 相关的每个文件和文件夹,试图找到指定 IP 的内容,但我找不到。我在 Windows 7 机器上运行 vagrant。这是我的 Vagrantfile:

C:\Users\.vagrant\boxes...\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.

如何使 virtualbox 上的 IP 不发生冲突?

UPDATE

我的 Vagrantfile 的图像


检查 LAN 连接上的 IP,并确保没有设备与 Vagrantfile 上的 IP 发生冲突。

我收到这个错误并且我有192.168.1.2在我笔记本电脑的 wifi 上,我正在设置192.168.1.10在我的 Vagrantfile 上。所以我将 Vagrantfile 上的 IP 更改为192.168.2.10确保它不会与我网络上的任何设备发生冲突。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Vagrant 网络与非 Hostonly 网络发生冲突 的相关文章

随机推荐