Azure the reserved IP does not exist

1.1k Views Asked by At

I have created a Reserved IP address using the following powershell cmdlet:

New-AzureReservedIP “dmz-live” –Label “be-dmz-ip” –Location “North Europe”

I had a previously created virtual machine called "be-dmz" and a cloud service "be-dmz" which I deleted and kept the attached disk.

I then tried to recreate the VM and assign it the static reserved ip as follows:

New-AzureVMConfig -Name "be-dmz" -InstanceSize "Standard_D11" –ImageName "be-dmz-be-dmz-0-201508101027470734" | New-AzureVM -ServiceName "be-dmz" –ReservedIPName " be-dmz-ip " -Location "North Europe”

But I am getting the error:

The reserved IP dmz-live does not exist

If I use the powershell cmdlet to show reserved IPs it as shown as follows:

ReservedIPName: dmz-live
Address: xxx.xxx.xxx.xxx
Label: be-dmz-ip
Location: North Europe
1

There are 1 best solutions below

0
On

Rather belatedly:

You've named the reserved ip dmz-live and labelled it be-dmz-ip.

When linking it up, you need to use the name and not the label (as well as remove the spaces):

New-AzureVMConfig -Name "be-dmz" -InstanceSize "Standard_D11" 
                  –ImageName "be-dmz-be-dmz-0-201508101027470734" | 
                  New-AzureVM -ServiceName "be-dmz" 
                  –ReservedIPName "dmz-live" -Location "North Europe”