XenapiNFS: Glance integration

Registered by Mate Lakat

Make XenapiNFS volume driver to be able to create a volume from a glance image.

Blueprint information

John Griffith
Mate Lakat
Series goal:
Accepted for grizzly
Milestone target:
milestone icon 2013.1
Started by
John Griffith
Completed by
Thierry Carrez

Related branches



There are two entry points for creating a volume from an image:

driver.clone_image(volume_ref, image_location)
driver.copy_image_to_volume(context, volume, image_service, image_id)

And for the other direction:
copy_volume_to_image(self, context, volume, image_service, image_meta)

# copy_image_to_volume with plugin

The entry point "copy_image_to_volume" will be used to call the glance xenapi plugin, and let it do the job:
The driver does the following:
  - Create a new volume
  - Call the xapi plugin to overwrite the created volume's vhd
  - Resize the volume

# copy_volume_to_image with plugin

The required parameters for the glance plugin are:
- vdi_uuids
- image_id
- glance_host
- glance_port
- glance_use_ssl
- sr_path
- auth_token
- properties: This is a dictionary to set x-image-meta-property-%s values in glance.
These parameters are present at the place of call, so it is straightforward to do the implementation.

# copy_image_to_volume generic case

What if we wanted to copy traditional images to the volume, like qcow or raw ones? In this case the glance image could not be used, so another approach is needed. At this point, the existing "image_utils.fetch_to_raw" could be re-used, after attaching the created volume to the cinder box.

#4 copy_volume_to_image generic case

More investigation is needed on this point


As the XenServer like images ar tgz -ed vhd files, they cannot be simply "streamed" into a volume. The existing xenapi plugins could be used, as they are implementing exactly the same functionality.

The entry point "clone_image" does not seem to be useful at the moment, as it seems to get a None value for image_location for the normal glance based copy case. Thus, shelve the use of this entry point until more knowledge is gained on it.

Gerrit topic: https://review.openstack.org/#q,topic:bp/xenapinfs-glance-integration,n,z

Addressed by: https://review.openstack.org/20790
    XenAPINFS: Copy image from glance

Addressed by: https://review.openstack.org/21206
    XenAPINFS: Copy volume to glance

Gerrit topic: https://review.openstack.org/#q,topic:bug/1130706,n,z


Work Items

Work items:
look at ways how to invoke xenapi plugin: DONE
copy_image_to_volume with plugin: DONE
copy_volume_to_image with plugin: DONE
copy_image_to_volume generic case: DONE
copy_volume_to_image generic case: INPROGRESS

Dependency tree

* Blueprints in grey have been implemented.

This blueprint contains Public information 
Everyone can see this information.


No subscribers.