What I have read so far on the web is that there is no way to add a reserved IP to an existing VM (unless I recreate the VM which I am trying to avoid). However, I have noticed
For new VMs (with resource manager) you should do the following:
Create new static IP address:
$ip = New-AzureRmPublicIpAddress -Name "<ip-name>" -ResourceGroupName <group-name> -Location eastus -AllocationMethod Static
Get information about VM Network Interface:
Get-AzureRmVM -ResourceGroupName <group-name> -Name <vm-name> | Select -ExpandProperty NetworkProfile
Get corresponding network interface and set new ip and update NIC:
$netInt = Get-AzureRmNetworkInterface -ResourceGroupName "group-name" -Name <nic-name>
$netInt.IpConfigurations[0].PublicIpAddress = $ip
Set-AzureRmNetworkInterface -NetworkInterface $netInt
At this point, we don't support the capability to associate a Reserved IP to an already existing VM. We are currently working on the capability to reserve the IP of an existing VM.
Ref: http://azure.microsoft.com/blog/2014/05/14/reserved-ip-addresses/ http://www.petri.com/how-to-reserve-public-virtual-ip-addresses-in-microsoft-azure.htm
Girish Prajwal