问题
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