When migrating services in Azure from the Classic Model to the Azure Resource Manager (ARM) you might have some reserved IP addresses in your classic model. The ARM counterpart of the reserved IP is the public IP. Creating a new public IP will result in another IP address and might cause issues with clients that have whitelisted your IP address.
Although it's best to use whitelisting based on the FQDN. However, it is sometimes not possible and IP whitelisting is the next-best alternative. How do you migrate from a reserved IP address to a public IP address, without getting a new IP address?
Classic Azure Virtual Network Classic Azure Reserved IP (Azure Public IP) Each classic Resource (except Cloud Services) has a new option in the blade called Migrate to ARM. Using this option you can migrate them into ARM.
If you can convert the IP to a Reserved IP Address, you can migrate the VM and IP Address to ARM, then switch the Public IPs. There will be a small downtime associated with the switch, typically no more than a minute. If the IP Address is an Instance Level Public IP, there is no way to migrate the IP Address.
Only Reserved IP Addresses are available for migration from classic to ARM. You can take an existing cloud service IP Address and make it reserved using Azure PowerShell. I assume that you have gotten this far, as you speak about the limit with Cloud Services.
As part of creating a new firewall policy, on the rule tab, you can import your Azure Firewall rules. This means you can capture your existing configuration, work on any changes in advance, then simply attach your newly updated policy
The actual credits for this topic are for Vatsana Kongtakane in this log entry. I have adapted the items, because I think most people will already have a reserved IP. The reason I put it on StackOverflow is to prevent the information from being lost.
Step 1 – Login and prepare your ARM environment
# Login to your ARM account
Add-AzureRmAccount
# Get a list of available subscriptions
Get-AzureRMSubscription
# Select your subscription
Select-AzureRmSubscription -SubscriptionName <SubscriptionName>
# Register migration provider, this can take a couple minuites
Register-AzureRmResourceProvider -ProviderNamespace Microsoft.ClassicInfrastructureMigrate
# View the current RegistrationState status, do not proceed to step 2 until the status says Registered
Get-AzureRmResourceProvider -ProviderNamespace Microsoft.ClassicInfrastructureMigrate
Step 2 – Login to your classic account
# Login to your ASM account
Add-AzureAccount
# Get a list of available subscriptions
Get-AzureSubscription
# Select your subscription
Select-AzureSubscription –SubscriptionName <SubscriptionName>
Step 3 – Migrate your reserved IP address
# Show the list of all reserved IP addresses
Get-AzureReservedIP
# De-associate the reserved IP address from your cloud service
# (only necessary if the IP is still assigned to a service)
Remove-AzureReservedIPAssociation -ReservedIPName <ReservedIPName> -ServiceName <ServiceName>
# Check for issues during migration
Move-AzureReservedIP -ReservedIPName <ReservedIPName> -Validate
# Prepare the ReservedIP for migration
Move-AzureReservedIP -ReservedIPName <ReservedIPName> -Prepare
# Commit to migrating the ReservedIP (take a pretty long time)
Move-AzureReservedIP -ReservedIPName <ReservedIPName> -Commit
Step 4 – Verify & Cleanup
At this point if you login to portal.azure.com, you should see the resource under Public IP Address with the correct IP address. It is being transferred to a new resource group, but you can move it to the resource group that you like.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With