无法在Azure中分配保留的IP

问题描述 投票:0回答:2

我正面临Azure中的IP分配问题。最近IP分配是动态我想要更改为保留但在门户网站上我无法看到此选项可编辑/启用进行更改并通过命令行我没有像New-AzureReservedIP这样的命令。有人可以帮忙吗?我会非常感激的。

谢谢

azure networking ip static-ip-address
2个回答
1
投票

或者,您可以使用powershell执行此操作,您可以使用以下脚本:在执行之前,请确保公共IP地址资源与运行网络接口无关。

 Login-AzureRMaccount

$PIPName = 'Public IP Name'
$ResourceGroupName = 'Resource Group Name'


$PIP = Get-AzureRmPublicIpAddress -Name $PIPName -ResourceGroupName $ResourceGroupName
$PIP.PublicIpAllocationMethod = "Static"  
Set-AzureRmPublicIpAddress -PublicIpAddress $PIP
Get-AzureRmPublicIpAddress -Name $PIPName -ResourceGroupName $ResourceGroupName

更多细节找到here


0
投票

要将IP分配更改为动态到静态:

VM =>转到设置=>网络=>单击公共IP =>设置=>配置=>分配:静态。

enter image description here

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.