Q: I created my own virtual machine image in Microsoft Azure; now how do I delete it?
A: If you create your own image in Microsoft Azure, you can use several methods to delete it. You can't just delete the VHD you uploaded, because it has a lease on it from the image that was created.
- Within the old Azure portal, navigate to Virtual Machines, Images; select the image and then select the Delete action, which will give you the option to also delete the associated VHD file.
- Use the PowerShell command Remove-AzureVMImage with the -DeleteVHD option to also remove the associated VHD; for example, Remove-AzureVMImage -ImageName MyTestImage -DeleteVHD.
- You can also use the REST call to delete images; this is documented on the Microsoft Azure "Delete VM Image" page.
0 comments
Hide comments