Mirko hi, wow, that sounds like a real headache )) virtual machines stuck in 'failed' state with disks hanging in 'detaching' limbo... yeah, that's no fun...........
u might wanna try forcing the vm deletion using azure cli or powershell. sometimes the portal gets stuck but command line pushes things through. just make sure u grab the vm id first.
check if there are any locks on the resources. azure resource locks can block deletions even if everything else seems fine. u can list them with 'az lock list' and remove if needed microsoft docs on resource locks.
as well check this... if the disks are stuck detaching, u might need to manually break the lease. azure storage has this thing called 'break lease' which can force-release a disk microsoft docs on breaking leases.
when resources get stuck, retry the operation after a few mins. sometimes the backend just needs a breather )) also, look at activity logs or audit trails, they often hide clues about what went wrong. worth looking into, even if u don't see errors upfront.
aha, and one more thing... if u're automating deletions, add some retry logic. api calls can fail silently, so code should handle that. this might help in other tools too, not just azure.
hope this unsticks things for u! if not, hit me up :)) good luck
Best regards,
Alex
and "yes" if you would follow me at Q&A - personaly thx.
P.S. If my answer help to you, please Accept my answer
PPS That is my Answer and not a Comment