1.2.8. Storing an image in RAW format
Procedure
With the
GlanceImageImportPlugins
parameter enabled, run the following command to upload aQCOW2
image and automatically convert it toRAW
format.$ glance image-create-via-import \ --disk-format qcow2 \ --container-format bare \ --name <name> \ --visibility public \ --import-method web-download \ --uri <http://server/image.qcow2>
-
Replace
<name>
with the name of the image; this is the name that appears inopenstack image list
. -
For
--uri
, replace<http://server/image.qcow2>
with the location and file name of the QCOW2 image.
This example command creates the image record and imports it by using the web-download
method. The glance-api
downloads the image from the --uri
location during the import process. If web-download
is not available, glanceclient
cannot automatically download the image data. Run the glance import-info
command to list the available image import methods.