当 VM 存在于负载平衡器 VNET 外部时,无法将 VM 添加到内部负载平衡器池

Cannot add VM to internal load balancer pool when VM exists outside of load balancer VNET

使用 Microsoft 内部负载平衡器 (ILB) 时,我想为驻留在 VNET 中的 VM 创建一个池,该 VNET 不同于 ILB 所在的 VNET。 UI 似乎支持这一点,因为在创建池时我可以 select 我环境中的任何 VNET。然而,当我创建这个池时,我收到以下错误,暗示这是不允许的。

NetworkInterfaceAndInternalLoadBalancerMustUseSameVnet

{"code":"BadRequest","message":"{\r\n \"error\": {\r\n \"code\": \"NetworkInterfaceAndInternalLoadBalancerMustUseSameVnet\",\r\n \"message\": \"Network interface /subscriptions/2f46d973-XXXX-XXXX-80a7-7222a103acb4/resourceGroups/ihde_operations/providers/Microsoft.Network/networkInterfaces/op-vm-ftp1463 uses internal load balancer /subscriptions/2f46d973-cea1-XXXX-XXXX-7222a103acb4/resourceGroups/ihde_dev/providers/Microsoft.Network/loadBalancers/dev-lb-CSL-Internal but does not use the same VNET (/subscriptions/2f46d973-cea1-4856-80a7-7222a103acb4/resourceGroups/IHDE_DEV/providers/Microsoft.Network/virtualNetworks/VNET_BACKEND) as the load balancer.\",\r\n \"details\": []\r\n }\r\n}"}]}

附带说明一下,负载均衡器的 public 版本确实支持这种情况,没有任何问题。

根据这个 doc

An internal Load Balancer differs from a public Load Balancer. Azure infrastructure restricts access to the load-balanced frontend IP addresses of a virtual network.

对于内部负载均衡器,它可以将虚拟网络中的 VM 负载均衡到驻留在同一虚拟网络中的一组 VM。 因此,您无法为驻留在与 ILB 所在的 VNET 不同的 VNET 中的 VM 创建池。