Azure 负载均衡器:NAT 将 RDP 重定向到 VM,并将 HTTP 负载均衡到可用性集?

Azure load balancer: NAT redirect RDP to VM, and load balance HTTP to availability set?

看起来你不能 NAT 和负载平衡,除非它是到同一个目的地。一旦我创建了 NAT 规则(这样我就可以通过自定义端口将 RDP 连接到负载均衡器,然后将其重定向到我的管理 VM),我无法创建用于 HTTP 负载均衡的后端池。我转到后端池并单击创建,它已经填写 "associated with ",我无法将其更改为我的 Web 虚拟机可用性集。

我还尝试先创建后端池,为此我 select 设置了 Web VM 可用性,但是当我创建 NAT 规则时,我无法指向管理 VM,只能指向可用性set/specific 该集合中的虚拟机。

我错过了什么?除了重新创建管理 VM 并将其放入 Web VM 可用性集中之外,还有其他解决方案吗?

I've also tried creating the backend pool first, for which I select the web VM availability set, but then when I create a NAT rule I cannot point to the management VM, only to the availability set/specific VM in that set.

所有这些都是设计行为。 LB 仅适用于可用性集或单个 VM。

Is there a solution besides recreating the management VM and putting it in the web VM availability set?

不,如果您想使用 LB 连接到管理 VM,我们应该重新创建它并将此 VM 添加到该可用性集中。

如果你只是想让这个VM可以连接到LB后面的那些VM,我们可以在那个Vnet中创建这个VM,然后使用管理VM的public IP地址登录这个VM,并使用私有IP地址连接到这些虚拟机。