gpt4 book ai didi

azure - 使用新规则更新现有 Azure 负载均衡器失败

转载 作者:行者123 更新时间:2023-12-03 03:06:29 25 4
gpt4 key购买 nike

我正在尝试使用新规则更新现有负载均衡器。

我正在根据微软的文档执行以下命令。 https://learn.microsoft.com/en-us/azure/load-balancer/load-balancer-get-started-internet-arm-ps#update-an-existing-load-balancer

$slb = Get-AzureRmLoadBalancer -Name  LB-Some-primary -ResourceGroupName SomeName
$slb | Add-AzureRmLoadBalancerInboundNatRuleConfig -Name "Test" -FrontendIpConfiguration $slb.FrontendIpConfigurations[0] -FrontendPort 29700 -BackendPort 24700 -Protocol TCP
$slb | Set-AzureRmLoadBalancer

我收到以下错误

Set-AzureRmLoadBalancer : Adding or updating NAT Rules when NAT pool is present on loadbalancer /subscriptions/xxxxxxxxxxxxx/resourceGroups/xxxxxx/providers/Microsoft.Network/loadBalancers/LB-xxxx-primary is not supported. To modify the load balancer, pass 
in all NAT rules unchanged or remove the LoadBalancerInboundNatRules property from your PUT request.
StatusCode: 400
ReasonPhrase: Bad Request
OperationID : 'xxxx-2596-4c9e-a30a-12be70fxxxxx'
At line:1 char:8
+ $slb | Set-AzureRmLoadBalancer
+ ~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Set-AzureRmLoadBalancer], NetworkCloudException
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.Network.SetAzureLoadBalancerCommand

我也从 Azure CLI 收到相同的错误。

最佳答案

根据您的描述,您似乎想要将 NAT 规则添加到 VMSS' 负载均衡器。

But for now, adding or editing references between load balancers and scale set virtual machines is currently disabled for load balancers that contain an existing association with a scale set.

该命令会发出提示,因为您正在尝试向已配置池的内容添加规则。

如果您想将 NAT 规则添加到 VMSS 的负载均衡器,我们应该使用新配置重新部署它。 VMSS 的配置与单个 VM 的配置略有不同。 VMSS 使用池来进行 NAT 规则而不是单独的规则,有关 VMSS 的负载均衡器的更多信息,请参阅此 link .

关于azure - 使用新规则更新现有 Azure 负载均衡器失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44059502/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com