Skip to content

Images service CLI reference

See https://docs.openstack.org/ocata/cli-reference/glance.html

These commands allow you to perform various operations on images, such as listing available images, creating new images, updating image metadata, and managing image tags. The <image_id_or_name> parameter can be either the ID or the name of the image, and you may need to provide additional options depending on the command and your specific requirements.

List images

Bash
openstack image list

Show image details

Bash
openstack image show <image_id_or_name>

Create an image

Bash
openstack image create --file <image_file> --disk-format <format> --container-format <format> <image_name>

Delete an image

Bash
openstack image delete <image_id_or_name>

Update an image

Bash
openstack image set --property <key>=<value> <image_id_or_name>

Download an image

Bash
openstack image save --file <destination_file> <image_id_or_name>

Add a tag to an image

Bash
openstack image add tag <image_id_or_name> <tag>

Remove a tag from an image

Bash
openstack image remove tag <image_id_or_name> <tag>

Deactivate an image

Bash
openstack image deactivate <image_id_or_name>

Reactive an image

Bash
openstack image reactivate <image_id_or_name>