Image management
Available images in the catalogue
% openstack image list
+----+---------------+--------+--------+
| ID | Name | Status | Server |
+----+---------------+--------+--------+
| 9 | cc-sl6.x86_64 | ACTIVE | |
+----+---------------+--------+--------+
Create from a running instance
To add a new image to your catalogue from a running VM:
% openstack server image create --name myimage myserver
Next, you may monitor the snapshot status with:
% openstack image list
[...]
| 65dabc30-6a8b-43fa-86db-be199269e78d | myimage | SAVING |
ed7f1a02-f472-485d-8c4b-ad4c5a21c5e5 |
[...]
To instantiate this image, you need to wait for the status to be ACTIVE.
Attention
It is recommended to make snapshots of the instances with little memory (flavor type: m1.tiny
/m1.small
).
Add an image to the catalogue
% openstack image create \
[--id <id>]
[--store <store>]
[--container-format <container-format>]
[--disk-format <disk-format>]
[--size <size>]
[--min-disk <disk-gb>]
[--min-ram <ram-mb>]
[--location <image-url>]
[--copy-from <image-url>]
[--file <file> | --volume <volume>]
[--force]
[--checksum <checksum>]
[--protected | --unprotected]
[--public | --private | --community | --shared]
[--property <key=value> [...] ]
[--tag <tag> [...] ]
[--project <project>]
[--project-domain <project-domain>]
<image-name>
Do not forget the option –private
so that the image is not accessible by other projects
Download an image from the catalogue
% openstack image save --file monfichier monimage
Edit metadata
% openstack image set --name nouveau_nom monimage
Delete an image
% openstack image delete monimage