I have a PowerShell script that create a VM (VM image) and then VM scal set with an load balancer. The script is working when I run the script on my local machine but when running the script through an Azure DevOps pipeline I’m getting a weird http 400 error. To understand the error, I’m then recreated the steps the fails from the Azure Portal but getting this error message: Select a Standard load balancer as the virtual machine scale set is configured with multiple placement groups. How do I set my load balancer to a “Standard load balancer”?
Thank You @Anders Dissing , Posting your solution as an answer for reference of other community members.
While creating a Load balancer using powershell , you can add the sku parameter as standard as the virtual machine scale set configured with multiple placement group requires standard load balancer .
New-AzLoadBalancer -Name "MyLoadBalancer" -ResourceGroupName "MyResourceGroup" -Location "West US" -FrontendIpConfiguration $frontend -BackendAddressPool $backendAddressPool -Probe $probe -LoadBalancingRule $lbrule -Sku Standard -Tier Global
Reference: