I am trying to assign a reserved ip address to a newly created VM on Azure. I am following steps indicated here on MSDN articledn690120.
Here is what I am doing and the error it throws:
Create VM Config with a cloned VHD (no issues here)
$migratedVM = New-AzureVMConfig -Name 'IP-CLONE' -DiskName 'TEST-AgendaCondivisa-2014-05-28.vhd' -InstanceSize 'Small'
Reserve an IP address
$ReservedIP = New-AzureReservedIP -ReservedIPName "IP-CLONE" -Label "IP-CLONE" -Location "Japan West"
Create VM
New-AzureVM -ServiceName "IP-CLONE" -Location "West Europe" -VMs $migratedVM -ReservedIPName $ReservedIP
OperationDescription OperationId OperationStatus
-------------------- ----------- ---------------
New-AzureVM 933fe90c-e087-bc26-882d-f5c79148f23e Succeeded
New-AzureVM : BadRequest: The Reserved IP Microsoft.WindowsAzure.Commands.ServiceManagement.Model.ReservedIPContext does not exist. At line:1 char:1 + New-AzureVM -ServiceName "IP-CLONE" -Location "West Europe" -VMs
$migratedVM -Re ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : CloseError: (:) [New-AzureVM], CloudException + FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.PersistentVMs.NewAzureVMCommand
Needless to say, if I do not use the “-reservedipname” switch everything works fine and the VM gets created without throwing errors.
Any idea?