透過Windows Azure PowerShell嘗試建立負載平衡端點,可能遇到【Load-balanced endpoints are not supported for role size】的錯誤
問題描述
今天嘗試利用Windows Azure PoerShell建立VM的direct server return 負載平衡端點時,發生Load-balanced endpoints are not supported for role size的錯誤。從錯誤訊息不難看出問題發生原因,但為了確定到底什麼樣的VM Size才支援負載平衡,還是花了一點時間尋找相關資料。
後來查到資料得知,基本(Basic)的虛擬機器層次是給開發人員用來開發或測試使用,拿掉了負載平衡以及自動調整規模的功能,也因為如此,它的價格相較於標準(Standard)來的便宜(如下圖所示)。
有關Basic虛擬機器層級的說明,摘要如下:
These new “Basic” VMs might be of interest to developers who are using Azure VMs for Dev/Test workloads and don’t need the load balancing and autos-caling features. These basic VMs will give developers equivalent compute capabilities at a lower cost if load balancing and auto-scaling are needed.
(資料來源:New Azure "Basic" Virtual Machines)
解決方式
要解決這個問題,只需在Microsoft Azure管理入口網站,將要設定負載平衡的虛擬機器由基本調整為標準,虛擬機器大小則視您的實際需求調整即可。
調整完虛擬機器層級為標準之後,就可以順利透過Windows Azure PowerShell建立負載平衡端點。
參考資料
Load Balancing for Azure Infrastructure Services
Creating Load Balanced Virtual Machines in a Virtual Network
Implementing load-balancing in azure