Using image metadata
Images have properties known as metadata that help describe the image and how it relates to other OpenStack components. The metadata that is applied to an image can be used to enable specific functionality in other OpenStack services or to determine the scheduling of an instance to a host based on CPU architectures or features, and more.
Setting image metadata
Image metadata in OpenStack can be manipulated using the openstack image set
command. The --property
argument can be used to set additional properties using the key=value
pairs.
Getting ready
When setting image metadata, 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
Property name and value
For our examples, the following will be used:
Image name:
COOKBOOK_UBUNTU_IMAGE
Property name and value:
architecture=m68k, os_distro=ubuntu
How to do it…
With the OpenStack client installed on our system, we are now able to set...