簡體   English   中英

在現有v-net中創建Azure負載均衡器時會擔心“負載均衡器未引用所有后端IP配置”

[英]Create Azure Load Balancer in existing v-net fears to “Not all Backend IP Configurations referenced by the Load Balancer”

我嘗試通過powershell在azure上創建負載均衡器,但是如果我使用來自其他資源組的現有vnet,則會收到錯誤消息。 (並非負載均衡器引用的所有后端IP配置)。 以后應將負載均衡器用於VM規模集。

但是我沒有為BackendAddressPoolConfig設置v-net和IP,我也看不到該怎么做。

$vnet= Get-AzureRmVirtualNetwork -Name $vnetname -ResourceGroupName $vnetrg -ErrorAction Stop
$subnetMain = $vnet.Subnets[2]
$subNetName = $subnetMain.Name
$frontendIP = New-AzureRmLoadBalancerFrontendIpConfig -Name LB-Frontend `
                                               -SubnetId $subnetMain.Id
$beaddresspool= New-AzureRmLoadBalancerBackendAddressPoolConfig -Name "LB-backend" 
$inboundNATRule1= New-AzureRmLoadBalancerInboundNatRuleConfig -Name "RDP" `
                                           -FrontendIpConfiguration $frontendIP `
                                           -Protocol TCP `
                                           -FrontendPort 3389 `
                                           -BackendPort 3389
$healthProbe = New-AzureRmLoadBalancerProbeConfig -Name "HealthProbe" `
                                           -RequestPath "Default.htm" `
                                           -Protocol http -Port 80 `
                                           -IntervalInSeconds 15 `
                                           -ProbeCount 2
$lbrule = New-AzureRmLoadBalancerRuleConfig -Name "HTTP" `
                                           -FrontendIpConfiguration $frontendIP `
                                           -BackendAddressPool $beAddressPool `
                                           -Probe $healthProbe `
                                           -Protocol Tcp `
                                           -FrontendPort 80 `
                                           -BackendPort 80

$nrplb = New-AzureRmLoadBalancer -ResourceGroupName $currentrg `
                                           -Name "NRP-LB" `
                                           -Location $loc `
                                           -FrontendIpConfiguration $frontendIP `
                                           -InboundNatRule $inboundNATRule1 `
                                           -LoadBalancingRule $lbrule `
                                           -BackendAddressPool $beAddressPool `
                                           -Probe $healthProbe

我必須為后端設置IP配置嗎? 但是如何? 還是伯爵錯了?

今天,發布了新的Azure Powershell 6.2.1版本。 這樣解決了問題。

參見https://github.com/Azure/azure-powershell/Releases

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM