如果未在 Azure VM 上配置 eth0 会怎样

What if eth0 not configured on Azure VM

我在 Azure VM 上部署了 3 个 NIC,例如 eth0、eth1 和 eth2。但是我只配置了 eth1 和 eth2 而没有配置 eth0。我的网络配置标记为失败。 是否需要在 Azure VM 上配置 eth0?如果是,为什么?

有必要配置主网络接口,因为主 NIC 用于通过网络连接与资源通信。 由于 Azure Linux 虚拟机 (VM) 上的主要接口是 eth0。 如果未配置 eth0,即使使用其他工具也无法通过网络连接访问 VM表示虚拟机已启动。

当您在 Azure VM 中设置多个 NIC 时。多 NIC VM 上的其中一个 NIC 需要为主。

Azure assigns a default gateway to the first (primary) network interface attached to the virtual machine. Azure does not assign a default gateway to additional (secondary) network interfaces attached to a virtual machine. Therefore, you are unable to communicate with resources outside the subnet that a secondary network interface is in, by default.

参考:https://docs.microsoft.com/en-us/azure/virtual-machines/windows/multiple-nics#configure-guest-os-for-multiple-nics