When deploying a cloud service, you will be assigned a random Public Virtual IP (VIP) address. This address will change if you delete your Web/Worker role and then deploy another version of your code.
With the latest release of the Azure PowerShell Cmdlets, you can now reserve the VIP address that was assigned to your Web/Worker role by using the following cmdlet.
New-AzureReservedIP –ReservedIPName <name of reservation> –Location <region> –ServiceName <name of your service>
eg: New-AzureReservedIP –ReservedIPName “myIPReservation” –Location “Australia East” –ServiceName “myWorkerRoleName”
Check if the reservation has been successful by executing the following cmdlet: Get-AzureReservedIP. Note the InUse should be True and the ServiceName is the name of your Web/Worker role.
Now to ensure that your cloud service will always use the reserved IP address with each new deployment, you will need to update the Service Configuration Schema (CSCFG) and add the ReservedIP element.