Azure, add IP address to cloud service

Azure now supports multiple IP addresses per cloud service. This means you can for example host multiple web sites, each running in different IP address on one cloud service (1..n virtual machines).

Right now it seems to be be possible to manage this only via the Azure PowerShell commandlets. After adding a secondary IP for my cloud service I was no longer able to manage the end points via Azure management web site or the command line tools.

In brief the commands to create a new reserved IP address and create a load balancer that uses the IP are following:

# Create a new reserved IP address
New-AzureReservedIP –ReservedIPName "MyIP"  –Location "West Europe"

# Create load balancer and end points that use the reserved IP
# Here I'm adding it to two virtual machines which are part of the cloud service
Get-AzureVM -ServiceName myservice -Name vm01`
| Add-AzureEndpoint -Name myEndpoint -LoadBalancedEndpointSetName http`
    -Protocol tcp -LocalPort 8001 -PublicPort 80 -VirtualIPName MyIP -DefaultProbe `
| Update-AzureVM

Get-AzureVM -ServiceName myservice -Name vm02`
| Add-AzureEndpoint -Name myEndpoint -LoadBalancedEndpointSetName http`
    -Protocol tcp -LocalPort 8001 -PublicPort 80 -VirtualIPName MyIP -DefaultProbe `
| Update-AzureVM

# To see the endpoints for VM
Get-AzureVm -ServiceName myservice  -name vm01 | Get-AzureEndpoint