azureazure-virtual-machineinternal-load-balancerazure-load-balancer

Attach Load Balancer to multiple VMs after machines are already created (Availability Set cannot be used in that case)


I created two VMs. I did not created Availability Set for them because I did not know I will need it. I do not want to re-create those VMs, since I needed one month to configure and install everything on them.

Now I created LB but I can see that I can associate it only to one VM or to Availability Set which will contain multiple VMs (which is as I stated not possible because it can be configured only during the creation of VM).

I try to associate LB to VM but I can see that I can select only one VM.

I cannot believe that I cannot select at least two VMs for LB??? Is this really working in this way?? This is really surprising for me and very disappointing.

Please suggest me if there is some quick work around how to associate Load Balancer with same resource group and virtual network to multiple VMs.

Please! Is there really not any kind of work around for this? I checked this and it was not mentioned how to associate multiple VMs. Azure load balancer with single VM


Solution

  • You can use a standard load balancer (you would need to attach standard public ips to the vms). The only way to make it work without Availability Set. Thats how it is in Azure, sadly.

    https://learn.microsoft.com/en-us/azure/load-balancer/load-balancer-standard-overview