Skip to content

How to change a 'snapshot' into an 'image'

Openstack considers Images and Snapshots as technically similar, but a Snapshot is usually the term used for a backup of an Instance, and an Image is the term usually used for a base installation that isn't specific to one Instance. OpenStack distinguishes Snapshots from Images (created by glance image-create or openstack image create) by means of metadata properties.  Removing certain metadata from a Snapshot "converts" it to an Image in the web interface menus.

With the Cloud Portal

Go to the Images page: https://cloud.s3it.uzh.ch/project/images/

Find your Snapshot and click "Update Metadata"

screenshot: edit metadata

On the right side, for the listed attributes under the heading "Existing Metadata", click the [➖] button for any of the following values that your snapshot has. It's possible that not all of these metadata fields are used.

  • image_location
  • image_state
  • image_type
  • kernel_id
  • owner_id
  • user_id
  • ramdisk_id

screenshot: update image metadata

After you have removed the fields, your view should look something like this:

screenshot: existing metadata

Click "Save" and your Image will be labeled as Type:Image in the list of Images/Snapshots.

From the Command Line

Given the VM snapshot UUID or name, the command to run is the following:

openstack image unset \
    --property image_location \
    --property image_state \
    --property image_type \
    --property kernel_id \
    --property owner_id \
    --property user_id \
    --property ramdisk_id \
    $UUID

Note

openstack image unset is only available in "recent" versions of the OpenStack clients.


Last update: July 30, 2021