Another quick note for myself about OpenStack. Quite often I see glance images that cannot be deleted because they are “protected”. This post shows how to deal with such OpenStack glance images.
Simply put, “protected” is a read-only flag for your server image in OpenStack. When creating or managing glance images, it’s possible to make some of them as “protected” – meaning any destructive operation on them will get rejected by OpenStack web and CLI interfaces.
I will follow up and update this post with the exact error message once I get a chance to work in an OpenStack lab again, but for now this is a placeholder.
When you’re running the standard server image deletion in OpenStack, you’ll get an error.
Here’s a command and approximately how the issue would look:
Naturally, the first step to deleting a protected image is to unprotect it. You can simply set a flag to make image non-protected. This is the command to activate the unprotected property for a given image:
After successful completion of the above command, you can attempt deleting the server image again as shown above.