question

jbassking-7863 avatar image
jbassking-7863 asked ·

Configure basic load balancer for existing VMs

I'm trying to configure a basic load balancer for two of our VMs. In order to do this is looks like I need an availability set. I didn't create on when I created the VMs and it doesn't look like I can assign one to the VMs now.

Do I need to create two more VMs and create the availability set at that point?

azure-virtual-machines
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

msrini-MSFT avatar image
msrini-MSFT answered ·

Hi,

When you want to load balance traffic between 2 VM for achieving high availability, it is not just enough to put the VMs behind the Load Balancer. You need to have those VMs in an availability set which will basically place the VM in different Fault Domain and Update domains providing high availability.

You can place VMs in an availability set only during the creation and cannot be placed after creation. So you can delete your VM and recreate by placing those VMs in an availability set, so that you can add it behind your basic Load balancer.

Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

jbassking-7863 avatar image
jbassking-7863 answered ·
1 comment Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thank you for sharing. This script basically removes your VM and creates another VM with the same data disk and puts it in to an availability set.
If you find my response helpful, accept the answer to help other community members

0 Votes 0 · ·
bedge avatar image
bedge answered ·

The virtual machine needs to be placed in an availability set in order to for it to be added to a Load Balancer.

Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.