OpenStack: Can I convert a volume into an image?

15,693

In Icehouse and later you can convert Cinder volume to Glance image with upload-to-image command:

cinder upload-to-image <volume> <image-name>
Share:
15,693

Related videos on Youtube

user2751502
Author by

user2751502

Updated on September 18, 2022

Comments

  • user2751502
    user2751502 over 1 year

    I am trying to figure out the path of least resistance in OpenStack to get from a live CD to a disk image that can be used for deploying new guest instances.

    If you boot an OpenStack instance from a live CD, you can install an OS onto the "ephemeral" disk (which will, in this case, be /dev/vda)...

    ...that's great, but there's no way to create an image from that disk; the image-create command will attempt (and fail) to snapshot the live CD itself (because this is the boot volume).

    You can create and attach a new volume (using volume-create and volume-attach) and then install the OS on that, but there's doesn't appear to be any way to convert this volume into a Glance-hosted image for use by other instances.

    As an administrator I can obviously log in to the storage host and create a new glance image directly from the volume block device, but this isn't an avenue available to anyone interacting via the API or web GUI.

    Are there any other options available?

  • user2751502
    user2751502 about 11 years
    This would be the "As an administrator I can obviously log in to the storage host and create a new glance image directly from the volume block device..." solution I was referring to in my question.