Azure | How to Associate a Dynamic IP to VM

01kg

01kg

Posted on March 20, 2024

Azure | How to Associate a Dynamic IP to VM

TL;DR

  1. VM's "Availability options" should be "No infrastructure redundancy required". Or will meet error:

Failed to update network interface 'something'. Error: Compute resource /subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.Compute/virtualMachines/xxx has a zone constraint 1 but the PublicIPAddress /subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.Network/publicIPAddresses/xxx-ip used by the compute resource via NetworkInterface or LoadBalancer has a different zone constraint Regional.

Here is a post that talks about this error

Image description

  1. Disassociate the old IP from VM and delete it.
  2. Create a new IP in the same resource group and the same Region as the old IP was by selecting:
    1. "Basic" for SKU
    2. "Dynamic" for IP address assignment

screenshot of Azure console when creating public IP address

WARNING: On 30 September 2025, Azure Basic (SKU) Public IP will be retired.

  1. Associate new IP to Network Interface by editing IP configuration (usually the name is "ipconfig1")

screenshot of Azure console

Next time you create a VM, create a Basic SKU Dynamic IP directly by click "Create new" in Network interface section:

Image description

💖 💪 🙅 🚩
01kg
01kg

Posted on March 20, 2024

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related