Common OpenStack image tasks
This section outlines a number of steps, intended as a quick overview only, when operating against the OpenStack Image service (known as Glance). For more detailed information and explanation of each task, refer to Chapter 6, Glance – OpenStack Image Service.
Getting ready
Ensure that you have the OpenStack clients installed, as described in the first recipes in this chapter.
How to do it…
Carry out the following steps to create and modify images in OpenStack:
Uploading an image to Glance
Uploading an image to OpenStack is achieved with the following. To upload, a QCOW2 image such as one provided by CirrOS for testing, carry out the following command:
openstack image create --container-type bare --disk-format qcow2 --public --file /path/to/cirros-0.3.5-x86_64-disk.img
Downloading an image or snapshot from Glance as a file
To download an image from Glance, perhaps for copying to another environment or to store as an offsite backup, carry out the following...