Menu Close

Chapter 35. image

This chapter describes the commands under the image command.

35.1. image add project

Associate project with image

Usage:

openstack image add project [-h] [-f {json,shell,table,value,yaml}]
                                   [-c COLUMN] [--max-width <integer>]
                                   [--fit-width] [--print-empty] [--noindent]
                                   [--prefix PREFIX]
                                   [--project-domain <project-domain>]
                                   <image> <project>

Table 35.1. Table Formatter

ValueSummary

--print-empty

Print empty table if there is no data to show.

--max-width <integer>

Maximum display width, <1 to disable. you can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.

--fit-width

Fit the table to the display width. implied if --max- width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable

Table 35.2. Positional Arguments

ValueSummary

<image>

Image to share (name or id)

<project>

Project to associate with image (name or id)

Table 35.3. Output Formatters

ValueSummary

output formatter options-f {json,shell,table,value,yaml}, --format {json,shell,table,value,yaml}

The output format, defaults to table

-c COLUMN, --column COLUMN

Specify the column(s) to include, can be repeated

Table 35.4. JSON Formatter

ValueSummary

--noindent

Whether to disable indenting the json

Table 35.5. Optional Arguments

ValueSummary

-h, --help

Show this help message and exit

--project-domain <project-domain>

Domain the project belongs to (name or id). this can be used in case collisions between project names exist.

Table 35.6. Shell Formatter

ValueSummary

a format a UNIX shell can parse (variable="value")--prefix PREFIX

Add a prefix to all variable names

35.2. image create

Create/upload an image

Usage:

openstack image create [-h] [-f {json,shell,table,value,yaml}]
                              [-c COLUMN] [--max-width <integer>]
                              [--fit-width] [--print-empty] [--noindent]
                              [--prefix PREFIX] [--id <id>]
                              [--container-format <container-format>]
                              [--disk-format <disk-format>]
                              [--min-disk <disk-gb>] [--min-ram <ram-mb>]
                              [--file <file> | --volume <volume>] [--force]
                              [--protected | --unprotected]
                              [--public | --private | --community | --shared]
                              [--property <key=value>] [--tag <tag>]
                              [--project <project>]
                              [--project-domain <project-domain>]
                              <image-name>

Table 35.7. Table Formatter

ValueSummary

--print-empty

Print empty table if there is no data to show.

--max-width <integer>

Maximum display width, <1 to disable. you can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.

--fit-width

Fit the table to the display width. implied if --max- width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable

Table 35.8. Positional Arguments

ValueSummary

<image-name>

New image name

Table 35.9. Output Formatters

ValueSummary

output formatter options-f {json,shell,table,value,yaml}, --format {json,shell,table,value,yaml}

The output format, defaults to table

-c COLUMN, --column COLUMN

Specify the column(s) to include, can be repeated

Table 35.10. JSON Formatter

ValueSummary

--noindent

Whether to disable indenting the json

Table 35.11. Optional Arguments

ValueSummary

--volume <volume>

Create image from a volume

--force

Force image creation if volume is in use (only meaningful with --volume)

--community

Image is accessible to the community

--id <id>

Image id to reserve

--private

Image is inaccessible to the public (default)

--disk-format <disk-format>

Image disk format. the supported options are: ami, ari, aki, vhd, vmdk, raw, qcow2, vhdx, vdi, iso, ploop. The default format is: raw

--unprotected

Allow image to be deleted (default)

--project-domain <project-domain>

Domain the project belongs to (name or id). this can be used in case collisions between project names exist.

--property <key=value>

Set a property on this image (repeat option to set multiple properties)

--min-disk <disk-gb>

Minimum disk size needed to boot image, in gigabytes

--min-ram <ram-mb>

Minimum ram size needed to boot image, in megabytes

--shared

Image can be shared

--file <file>

Upload image from local file

--container-format <container-format>

Image container format. the supported options are: ami, ari, aki, bare, docker, ova, ovf. The default format is: bare

-h, --help

Show this help message and exit

--tag <tag>

Set a tag on this image (repeat option to set multiple tags)

--public

Image is accessible to the public

--project <project>

Set an alternate project on this image (name or id)

--protected

Prevent image from being deleted

Table 35.12. Shell Formatter

ValueSummary

a format a UNIX shell can parse (variable="value")--prefix PREFIX

Add a prefix to all variable names

35.3. image delete

Delete image(s)

Usage:

openstack image delete [-h] <image> [<image> ...]

Table 35.13. Positional Arguments

ValueSummary

<image>

Image(s) to delete (name or id)

Table 35.14. Optional Arguments

ValueSummary

-h, --help

Show this help message and exit

35.4. image list

List available images

Usage:

openstack image list [-h] [-f {csv,json,table,value,yaml}] [-c COLUMN]
                            [--max-width <integer>] [--fit-width]
                            [--print-empty] [--noindent]
                            [--quote {all,minimal,none,nonnumeric}]
                            [--sort-column SORT_COLUMN]
                            [--public | --private | --shared]
                            [--property <key=value>] [--name <name>]
                            [--status <status>] [--long]
                            [--sort <key>[:<direction>]]
                            [--limit <num-images>] [--marker <image>]

Table 35.15. Table Formatter

ValueSummary

--print-empty

Print empty table if there is no data to show.

--max-width <integer>

Maximum display width, <1 to disable. you can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.

--fit-width

Fit the table to the display width. implied if --max- width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable

Table 35.16. CSV Formatter

ValueSummary

--quote {all,minimal,none,nonnumeric}

When to include quotes, defaults to nonnumeric

Table 35.17. Output Formatters

ValueSummary

output formatter options-f {csv,json,table,value,yaml}, --format {csv,json,table,value,yaml}

The output format, defaults to table

-c COLUMN, --column COLUMN

Specify the column(s) to include, can be repeated

--sort-column SORT_COLUMN

Specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), can be repeated

Table 35.18. JSON Formatter

ValueSummary

--noindent

Whether to disable indenting the json

Table 35.19. Optional Arguments

ValueSummary

--public

List only public images

--private

List only private images

--name <name>

Filter images based on name.

--property <key=value>

Filter output based on property

--status <status>

Filter images based on status.

--limit <num-images>

Maximum number of images to display.

--marker <image>

The last image of the previous page. display list of images after marker. Display all images if not specified. (name or ID)

--long

List additional fields in output

--sort <key>[:<direction>]

Sort output by selected keys and directions(asc or desc) (default: name:asc), multiple keys and directions can be specified separated by comma

--shared

List only shared images

-h, --help

Show this help message and exit

35.5. image remove project

Disassociate project with image

Usage:

openstack image remove project [-h] [--project-domain <project-domain>]
                                      <image> <project>

Table 35.20. Positional Arguments

ValueSummary

<image>

Image to unshare (name or id)

<project>

Project to disassociate with image (name or id)

Table 35.21. Optional Arguments

ValueSummary

-h, --help

Show this help message and exit

--project-domain <project-domain>

Domain the project belongs to (name or id). this can be used in case collisions between project names exist.

35.6. image save

Save an image locally

Usage:

openstack image save [-h] [--file <filename>] <image>

Table 35.22. Positional Arguments

ValueSummary

<image>

Image to save (name or id)

Table 35.23. Optional Arguments

ValueSummary

-h, --help

Show this help message and exit

--file <filename>

Downloaded image save filename (default: stdout)

35.7. image set

Set image properties

Usage:

openstack image set [-h] [--name <name>] [--min-disk <disk-gb>]
                           [--min-ram <ram-mb>]
                           [--container-format <container-format>]
                           [--disk-format <disk-format>]
                           [--protected | --unprotected]
                           [--public | --private | --community | --shared]
                           [--property <key=value>] [--tag <tag>]
                           [--architecture <architecture>]
                           [--instance-id <instance-id>]
                           [--kernel-id <kernel-id>] [--os-distro <os-distro>]
                           [--os-version <os-version>]
                           [--ramdisk-id <ramdisk-id>]
                           [--deactivate | --activate] [--project <project>]
                           [--project-domain <project-domain>]
                           [--accept | --reject | --pending]
                           <image>

Table 35.24. Positional Arguments

ValueSummary

<image>

Image to modify (name or id)

Table 35.25. Optional Arguments

ValueSummary

--instance-id <instance-id>

Id of server instance used to create this image

--unprotected

Allow image to be deleted (default)

--activate

Activate the image

--accept

Accept the image membership

--community

Image is accessible to the community

--os-version <os-version>

Operating system distribution version

--private

Image is inaccessible to the public (default)

--name <name>

New image name

--project <project>

Set an alternate project on this image (name or id)

--min-ram <ram-mb>

Minimum ram size needed to boot image, in megabytes

--deactivate

Deactivate the image

-h, --help

Show this help message and exit

--project-domain <project-domain>

Domain the project belongs to (name or id). this can be used in case collisions between project names exist.

--protected

Prevent image from being deleted

--pending

Reset the image membership to pending

--os-distro <os-distro>

Operating system distribution name

--architecture <architecture>

Operating system architecture

--property <key=value>

Set a property on this image (repeat option to set multiple properties)

--reject

Reject the image membership

--shared

Image can be shared

--min-disk <disk-gb>

Minimum disk size needed to boot image, in gigabytes

--ramdisk-id <ramdisk-id>

Id of ramdisk image used to boot this disk image

--tag <tag>

Set a tag on this image (repeat option to set multiple tags)

--public

Image is accessible to the public

--kernel-id <kernel-id>

Id of kernel image used to boot this disk image

--disk-format <disk-format>

Image disk format. the supported options are: ami, ari, aki, vhd, vmdk, raw, qcow2, vhdx, vdi, iso, ploop

--container-format <container-format>

Image container format. the supported options are: ami, ari, aki, bare, docker, ova, ovf

35.8. image show

Display image details

Usage:

openstack image show [-h] [-f {json,shell,table,value,yaml}]
                            [-c COLUMN] [--max-width <integer>] [--fit-width]
                            [--print-empty] [--noindent] [--prefix PREFIX]
                            [--human-readable]
                            <image>

Table 35.26. Table Formatter

ValueSummary

--print-empty

Print empty table if there is no data to show.

--max-width <integer>

Maximum display width, <1 to disable. you can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.

--fit-width

Fit the table to the display width. implied if --max- width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable

Table 35.27. Positional Arguments

ValueSummary

<image>

Image to display (name or id)

Table 35.28. Output Formatters

ValueSummary

output formatter options-f {json,shell,table,value,yaml}, --format {json,shell,table,value,yaml}

The output format, defaults to table

-c COLUMN, --column COLUMN

Specify the column(s) to include, can be repeated

Table 35.29. JSON Formatter

ValueSummary

--noindent

Whether to disable indenting the json

Table 35.30. Optional Arguments

ValueSummary

-h, --help

Show this help message and exit

--human-readable

Print image size in a human-friendly format.

Table 35.31. Shell Formatter

ValueSummary

a format a UNIX shell can parse (variable="value")--prefix PREFIX

Add a prefix to all variable names

35.9. image unset

Unset image tags and properties

Usage:

openstack image unset [-h] [--tag <tag>] [--property <property-key>]
                             <image>

Table 35.32. Positional Arguments

ValueSummary

<image>

Image to modify (name or id)

Table 35.33. Optional Arguments

ValueSummary

-h, --help

Show this help message and exit

--property <property-key>

Unset a property on this image (repeat option to unset multiple properties)

--tag <tag>

Unset a tag on this image (repeat option to unset multiple tags)