After assigning azure VM public IP (PIP) it is not updated in portal

535 views Asked by At

I have got a linux VM in azure with dynamic IP assigned. As I run a web application in that server, I wanted to assign a ILPIP to it. I reserved a new PIP to an existing VM using Get-AzureVM -ServiceName <servicename> -Name <vmname> | Set-AzurePublicIP -PublicIPName <ipname> | Update-AzureVM.

When checked using Get-AzureRole -ServiceName <servicename> -Slot Production -InstanceDetails, the vm is shown with the new public IP address, but the new IP is not shown in the portal, and the status of IP assignment in the VM is still shown as dynamic. Am I missing something?

1

There are 1 answers

4
Alex Belotserkovskiy On BEST ANSWER

Execute PowerShell commandlets:

$cs = Get-AzureService -ServiceName "totestubuntu1"
New-AzureReservedIP -ReservedIPName "ipname2" `
    -Location "East US" -ServiceName $cs.ServiceName

You will get Reserved state and Reserved Public IP for your VM exposed to the world.

enter image description here