resources remain even when i force delete the whole resource group and it's content

Nima Azimzadeh 5 Reputation points
2024-05-13T17:23:46.11+00:00

i have created a resource group named "milan" . i supposed to create a VM inside it and i was using Azure portal. during the deployment i faced with some errors and only these resources got created:
"public ip" , "Vnet", "NSG" .

even i tried to delete them separately but non of them got deleted. the log is too short and just says it is failde.

even i tried to create anther VM in the same resource group and attach the public IP to it, again it failed in the same level. i attached the logs about second time deployment.error

even i tried to delete using az cli and i faced with this:error2

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,290 questions
{count} votes

1 answer

Sort by: Most helpful
  1. kobulloc-MSFT 24,321 Reputation points Microsoft Employee
    2024-05-20T22:10:39.29+00:00

    Hello, @Nima Azimzadeh !

    Why am I getting the following errors when creating a VM?

    When creating a VM in Azure the operation failed: "The resource write operation failed to complete successfully, because it reached terminal provisioning state "Failed". (Code: ResourceDeploymentFailure)

    This error by itself has a wide variety of possible causes. @Stuart Dobson has recommended looking at the JSON tab for more information to help with troubleshooting:

    I have found you're able to get more details by going to the Deployments tab in Azure, clicking on the failed deployment, Related Events, Expand the Operation, find the one that failed and then, this is the important bit, look at the Json tab. I've found that there is usually more added to the message than is shown further up the chain.

    Without looking at additional information, some possible causes for this error include:

    • Outdated or incomplete JSON/ARM template: The ARM template you are using for deployment may be missing key fields.
    • Incompatible configuration values: If you are not creating the VM using the portal, it is possible to include incompatible configuration values (size/storage options, Trusted Launch limitations, etc.). Try creating the VM using the same values in the portal to see if it triggers a warning.
    • Azure Policy: An Azure Policy may prevent a required action from completing to create the VM.

    That you aren't able to delete the resources that have been created makes me think there may be something related to a policy or possibly a role restriction. If that's not the case, then we'll need to investigate this further by looking at the resources. If you would like us to do that, please email the following to AzCommunity@microsoft.com and we'll get back to you promptly:

    • Subject: "Attn: kobulloc - Unable to create VM or delete resources"
    • Email body: Your Subscription ID
    • Email body: A link to this thread so we can validate and expedite the request

    If you don't receive a response within 24 hours, please reply to the thread so we can investigate.


    I hope this has been helpful! Your feedback is important so please take a moment to accept answers.

    If you still have questions, please let us know what is needed in the comments so the question can be answered. Thank you for helping to improve Microsoft Q&A!

    User's image

    0 comments No comments