Keep the public IP of Cloud Services (extended support) when replacing it with a VM

Ian Alejandro Corral Marin 0 Reputation points
2026-11-19T18:54:25.88+00:00

We run a TCP service on Cloud Services (extended support) with a static Basic public IP. Before the March 2027 retirement we will replace it with a Windows VM in another subscription of the same tenant and region. Our field devices connect to that exact IP address and cannot be reconfigured, so we must keep it.

  1. If we delete the cloud service, does the public IP resource remain with the same address?
  2. Can we then upgrade it to Standard SKU, move it to the other subscription and associate it with the VM's NIC, keeping the address?
  3. Is there any supported way to detach the IP from the cloud service without deleting it?
  4. Will a CanNotDelete lock on the public IP block deleting the cloud service? Has anyone done this, or is it documented somewhere?
Azure Cloud Services
Azure Cloud Services

An Azure platform as a service offer that is used to deploy web and cloud applications.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Andriy Bilous 12,676 Reputation points MVP
    2026-11-20T11:17:36.6533333+00:00

    Hello Ian Alejandro Corral Marin

    Preserving the same public IP is potentially possible.

    Answering your questions

    1. Will the IP survive Cloud Service deletion?

    Cloud Services (extended support) uses a separately represented public IP and a platform-managed load balancer.

    In a similar Microsoft Q&A case, deleting the Cloud Service cleans up its load balancer and that the public IP can be deleted separately afterward. This suggests the IP resource can remain, but it is not a guarantee for every deployment or deletion method. In particular, do not delete the containing resource group.

    2. Can the IP be upgraded and moved to another subscription?

    Yes, provided the public IP survives as a standalone, unassociated resource and meets the upgrade requirements.

    Steps:

    • Upgrading a detached static Basic IP to Standard preserves its address.
    • A detached Standard public IP can be moved across subscriptions.
    • Both subscriptions must belong to the same Microsoft Entra tenant.

    The intended sequence would be:

    1. Safely disassociate and preserve the original IP.
    2. Verify that the exact IP address remains allocated.
    3. Upgrade Basic → Standard.
    4. Move the detached Standard public IP to the destination subscription.
    5. Associate it with the Windows VM's NIC and configure the NSG to permit your TCP service.

    References:

    3. Can the IP be detached without deleting the Cloud Service?

    This operation replaces a Cloud Service's reserved public IP with another standalone public IP.

    Cloud Services FAQ states that reserved IPs cannot normally be changed during deployment updates.

    Disassociate Cloud Service Reserved Public IP

    4. Will a CanNotDelete lock protect the IP?

    A CanNotDelete lock prevents direct deletion of the protected resource, but it is not a documented guarantee that Cloud Service deletion will preserve the associated IP.

    If Cloud Service cleanup requires deleting that IP, the lock could cause the deletion operation to fail.

    I would not rely on a resource lock as the migration mechanism.

    Before changing anything, inspect the current IP:

    az network public-ip show \
      --resource-group "<resource-group>" \
      --name "<public-ip-name>" \
      --query "{ip:ipAddress,sku:sku.name,allocation:publicIPAllocationMethod,association:ipConfiguration.id}" \
      -o json
    

    Obtain confirmation of the detachment procedure first, then perform the upgrade and subscription move during a planned maintenance window. Do not release or recreate the existing IP the original numeric address cannot be recovered reliably once its resource is deleted.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.