Azure PowerShell: Migrate an Azure ASM Virtual IP address (VIP) to an ARM Public IP address (PIP)

12:13 pm in ARM, ASM, Azure, Azure PowerShell, Cloud, PIP, Public Cloud, Public IP address, VIP, Virtual IP address by Wim Matthyssen

The last weeks, I am assisting some customers with the migration of their existing Azure Service Manager (ASM) VMs to the Azure Resource Manager (ARM) portal. Most of those workloads are migrated with the use of Azure Site Recovery (ASR). The only thing ASR cannot handle for the moment is the migration of the Cloud Services Virtual IP Address (VIP). This public IP address can for example used by an IIS website running on a specific IaaS virtual machine (VM) which is part of that Cloud Service. You can work around this problem, as in many of these cases, by using Azure PowerShell. Below I will wake you through this process with an example.

Overview used Azure VMs:

1) First, we need to login and prepare the ARM environment. To do so run following PowerShell commands (change variables as needed):



2) Next we need to login to the ASM environment


3) As the next step we need to reserve the public IP Address


4) Next we need to de-associate the Reserverd IP address from the Cloud Service. Press Yes when asked



5) When you now check the list of reserved IP addresses, it will show the reserved IP address as unassigned. The attribute InUse is set to False and the ServiceName and DeploymentName attributes are empty


6) Also check if the Reserved IP address is valid for migration


7) Next we need to prepare the Reserved IP address for migration


8) Now run the following PowerShell command to finalize the migration of the Reserved IP address


9) You can verify the availability of the migrated Public IP address by login in to the Azure portal. Under Public IP address, you should see the resource with the correct IP address



10) Now, you can move this resource to the correct resource group. When you do so, and your asked to Confirm the move, click Yes




11) Afterwards you can assign the public IP address to whichever resource you would like



That concludes this blog post. Hope it comes to your use.

Wim Matthyssen (@wmatthyssen)