Search code examples
azureazureportalazure-artifacts

delete failed artifacts in Azure portal


I need to install a bunch of artifacts in Azure portal. I accidentally tried to install an artifact that will definitely fail due to some permission etc. Now it fails and blocks any further artifacts to install. Please see the screenshot.

I googled, but only found people talking about deleting already installed artifacts, or how to resolve installing problem so they can go ahead installing that failed artifact again.

But here, this artifact will fail to install anyway, so I have to remove it from the to-be-install list.

How can I remove this artifact from the install list?enter image description here


Solution

  • I tried to reproduce your scenario on my end and got below results:-

    AFAIK, Applying artifacts to the VM is a one time manual process. And once the base Artifacts are applied and they fail, there’s no option for now to delete the failed artifacts as they are already deployed inside the VM OS. You can only inspect the reason behind the failure and create a new VM inside the lab with correct artifacts again. While creating a new VM you can choose to delete/add correct artifacts. Apart from azure Portal even Rest API’s do not yet support deleting applied artifacts from the VM refer below :-

    https://learn.microsoft.com/en-us/rest/api/dtl/virtual-machines

    Created one VM in the Dev-Test lab and applied Artifacts which failed during creation : -

    enter image description here

    In Portal there’s no option to delete the failed artifacts for now. But, You can inspect the reason behind the failure like below :-

    enter image description here

    Or Even find the logs in the Dev-test Lab’s storage account like below :-

    enter image description here

    You can create a new VM by adding correct artifacts like below :-

    Reference :-

    Azure DevTest lab VM artifacts - Stack Overflow by Erikson Bahr