Deactivating images
By default, images are available for use immediately upon completion of the uploading process. At times, it may be necessary to deactivate an image to prevent users from booting instances with the image, especially in cases where the image may be outdated but must be retained for archival purposes.
Deactivating an image
Images can be deactivated using the openstack image set
command with the --deactivate
argument.
Getting ready
When deactivating an image, ensure that you are authenticated as an administrator or are the owner of the image. You will need the following details, at a minimum:
Image name or ID
For our examples, the following will be used:
Image name:
COOKBOOK_UBUNTU_IMAGE
How to do it…
With the OpenStack client installed on our system, we are now able to deactivate an image with the following command:
openstack image set COOKBOOK_UBUNTU_IMAGE --deactivate
No output is returned if the operation is successful. Use the openstack image show
command to reveal the status...