How to assign a reserved IP to a classic cloud service through Portal

五迷三道 提交于 2021-02-07 21:49:19

问题


This is an easy task with PowerShell.

But since we can now create reserved IP's through the Azure Portal, is it also possible to assign it to a classic cloud service through the portal? I can't find any documentation about it.


回答1:


You can't using azure portal. You can using azure powershell cmdlets.

For existing cloud service-

New-AzureReservedIP –ReservedIPName "MyReservedIP" –Location "YourLocation"
New-AzureReservedIP –ReservedIPName "MyReservedIP" –Location "YourLocation" -ServiceName "TestService"

For a new cloud service-

New-AzureReservedIP –ReservedIPName "MyReservedIP" –Location "Central US"
$image = Get-AzureVMImage|?{$_.ImageName -like "*RightImage-Windows-2012R2-x64*"}
New-AzureVMConfig -Name "TestVM" -InstanceSize "Small" -ImageName $image.ImageName `
| Add-AzureProvisioningConfig -Windows -AdminUsername "adminuser" -Password "MyP@ssw0rd!!" `
| New-AzureVM -ServiceName "TestService" -ReservedIPName "MyReservedIP" -Location "Central US"

You can refer to the standard documentaion here- https://azure.microsoft.com/en-us/documentation/articles/virtual-networks-reserved-public-ip/



来源:https://stackoverflow.com/questions/39657576/how-to-assign-a-reserved-ip-to-a-classic-cloud-service-through-portal

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!