I have created a VM on Azure and captured an image from it, which made the VM generalized. Now I don't need the VM resource but when I try to delete it I get the error:
Failed to delete virtual machine
An error occurred while deleting virtual machine and/or any selected resource(s) associated with it. Error: 'Operation 'Update VM' is not allowed on VM '' since the VM is generalized.
CodePudding user response:
This seems to be an limitation when you try to delete the VM manually from Azure . After you have created the VM Snapshot it gives the below error on deletion :
There is a workaround for this issue , that is after creating a snapshot you can delete it by checking the box automatically delete this VM after creating the image
like below :
I tested the same in my environment , as we have already created a snapshot earlier , I created another image version for the same vm and then checked the box while creating the image and the VM was successfully deleted :