作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试使用新规则更新现有负载均衡器。
我正在根据微软的文档执行以下命令。 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/
我是一名优秀的程序员,十分优秀!