更新时间:2023-01-24 19:25:04
eth0
默认被 Vagrant 用于 NAT(VirtualBox NAT 网络模式),它允许你 vagrant ssh
到框中(端口转发规则 - 主机 2222 来宾 22).
eth0
is by default used by Vagrant for NAT (VirtualBox NAT networking mode), which allow you to vagrant ssh
into the box (port forwarding rules - host 2222 <=> guest 22).
这就是为什么即使 Vagrantfile
中只有 1 个 config.vm.network
你有 2 个 NIC.
That's why you have 2 NICs even though you have only 1 config.vm.network
in Vagrantfile
.
我不认为它可以被禁用,但我不是 100% 确定,您可能需要查看 vagrant 源代码以进一步挖掘.
I don't think it can be disabled, BUT I am not 100% sure, you may want to look into vagrant source code to dig further.