We see the same concepts already seen in the paragraph 2) Upload and manage images, but this time from the command line.
List or get details for images
To get a list of images and to get further details about a single image, use
Create or update an image
To create or update an existing image, use
Create or update an image
$ openstack image create <image-name> $ openstack image set <image>
The following list explains the optional arguments that you can use with the both commands to modify image properties
--name NAME | The name of the image. |
---|---|
--disk-format DISK_FORMAT | The disk format of the image (ami, ari, aki, vhd, vhdx, vmdk, raw, qcow2, vdi, iso). |
--container-format CONTAINER_FORMAT | The container format of the image (ami, ari, aki, bare, docker, ova, and ovf). |
--owner TENANT_ID | The tenant who should own the image. |
--size SIZE | The size of image data, in bytes. |
--min-disk DISK_GB --min-ram DISK_RAM | The minimum size of the disk/RAM needed to boot the image, in gigabytes/megabytes. |
--location IMAGE_URL | The URL where the data for this image resides. This option is only available in V1 API. When using it, you also need to set --os-image-api-version . For example, if the image data is stored in swift, you could specify --os-image-api-version 1 --location swift://account:key@example.com/container/obj . |
--file FILE | Local file that contains the disk image to be uploaded during the update. Alternatively, you can pass images to the client through stdin. |
--checksum CHECKSUM | Hash of image data to use for verification. |
--copy-from IMAGE_URL | Similar to --location in usage, but indicates that the image server should immediately copy the data and store it in its configured image store. |
--is-public [True|False] | Makes an image accessible for all the tenants (admin-only by default). |
--is-protected [True|False] | Prevents an image from being deleted. |
--property KEY=VALUE | Arbitrary property to associate with image. This option can be used multiple times. |
--purge-props | Deletes all image properties that are not explicitly set in the update request. Otherwise, those properties not referenced are preserved. |
--human-readable | Prints the image size in a human-friendly format. |