The cloud operator assigns roles that grant users the ability to upload and manage images. You can upload images through the Metacloud client or the Image service API.
The Image service enables users to discover, register, and retrieve virtual machine images. It accepts API requests for disk or server images, and metadata definitions from end users or Metacloud Compute components. It also supports the storage of disk or server images on various repository types, including Object Storage.
You can use the
openstack client for the image management, which provides mechanisms to list and delete images, set and delete image metadata, and create images of a running instance or snapshot and backup types.
After you upload an image, you cannot change it.
|List of images||
|Show image details||
|Create an image||
|Update an image||
|Upload an image||
|Delete an image||
grep command to filter a list for a specific keyword, for example:
$ openstack image list | grep 'cirros' | 95d786e3-0a6c-4db1-bc3c-1a184d585ff1 | cirros-0.3.4-x86_64 | active | | d51b539b-a8a8-4274-808f-3dc96b6199a1 | cirros-0.3.3-x86_64 | active |
You can use optional arguments with the
set commands to modify the image properties. The following example demonstrates uploading a CentOS 6.3 image in qcow2 format for public access:
$ openstack image create centos63-image \ --disk-format qcow2 \ --container-format bare \ --public --file ./centos63.qcow2
||The name of the image.|
||The disk format of the image. Acceptable formats are ami, ari, aki, vhd, vmdk, raw, qcow2, vdi, and iso.|
||Local file that contains the disk image to upload during the update. Alternatively, you can pass images to the client through stdin.|
||Public makes an image accessible for all (The default is
||Protected prevents an image from being deleted.|
Setting Image Properties
To update an existing image with properties that describe the disk bus, the CD-ROM bus, and the VIF model:
$ openstack image set <IMAGE> \ --property hw_disk_bus=scsi \ --property hw_cdrom_bus=ide \ --property hw_vif_model=e1000 \
To set the operating system ID or a
short-id in image properties:
$ openstack image set <IMAGE> --property short-id=fedora23
id to a URL:
$ openstack image set <IMAGE_ID> \ --property id=http://fedoraproject.org/fedora/23