![为什么我的虚拟机上有两个接口?](https://linux22.com/image/154538/%E4%B8%BA%E4%BB%80%E4%B9%88%E6%88%91%E7%9A%84%E8%99%9A%E6%8B%9F%E6%9C%BA%E4%B8%8A%E6%9C%89%E4%B8%A4%E4%B8%AA%E6%8E%A5%E5%8F%A3%EF%BC%9F.png)
对于我的一个项目,我通过定义私有 IP 使用标准 Vagrantfile 创建虚拟机
流浪文件
hosts = {
"n1" => "192.168.77.10",
"n2" => "192.168.77.11",
"n3" => "192.168.77.12",
"n4" => "192.168.77.13"
}
Vagrant.configure("2") do |config|
# always use Vagrants insecure key
config.ssh.insert_key = false
# forward ssh agent to easily ssh into the different machines
config.ssh.forward_agent = true
check_guest_additions = false
functional_vboxsf = false
config.vm.box = "ubuntu/bionic64"
hosts.each do |name, ip|
config.vm.define name do |machine|
machine.vm.network :private_network, ip: ip
machine.vm.provider "virtualbox" do |v|
v.name = name
end
end
end
end
我怎么会有 enp0s3 和 enp0s8 接口?