Need a property in glance metadata to indicate the vm id when create vm snapshot

Registered by David Geng

In order to manage the snapshot of vm in glance conveniently, we need know which images in glance are captured from the specified VM.
So we need add new property in glance metadata when create the vm snapshot, for example:
instance_uuid which is used to save the vm uuid. This new property will help to filter the image when use the glance image-list.

Blueprint information

Status:
Complete
Approver:
None
Priority:
Undefined
Drafter:
David Geng
Direction:
Needs approval
Assignee:
David Geng
Definition:
Obsolete
Series goal:
None
Implementation:
Started
Milestone target:
None
Started by
David Geng
Completed by
David Geng

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bp/save-instance-id-snapshot,n,z

Addressed by: https://review.openstack.org/79857
    Add new property 'instance_uuid' in the image metadata

Addressed by: https://review.openstack.org/79974
    Add new property 'instance_uuid' in the image metadata for vmware driver

###############################
Is there a related glance blueprint to use the new property on the image metadata? Please link that here.

Also, I think we're going to want a Tempest scenario test to go with this since it's something that's cross-project.

-- mriedem 2014/03/14
###############################

###############################
@mriedem, we need not any changes in glance since glance already support to use a property to filter the result of the image-list ( That is the --property-filter ), we can reuse that.

-- gengjh 2014/03/14
###############################
Gerrit topic: https://review.openstack.org/#q,topic:bp/save-instance-id-snapshot,n,z

Addressed by: https://review.openstack.org/79857
    Add new property 'instance_uuid' in the image metadata

Addressed by: https://review.openstack.org/79974
    Add new property 'instance_uuid' in the image metadata for vmware driver

###############################
Is there a related glance blueprint to use the new property on the image metadata? Please link that here.

Also, I think we're going to want a Tempest scenario test to go with this since it's something that's cross-project.

-- mriedem 2014/03/14
###############################

###############################
@mriedem, we need not any changes in glance since glance already support to use a property to filter the result of the image-list ( That is the --property-filter ), we can reuse that.

-- gengjh 2014/03/14
###############################

If you are still working on this, please re-submit via nova-specs. If not, please mark as obsolete, and add a quick comment to describe why. --johnthetubaguy (20th April 2014)

==================
What is the use case here? If you're storing the instance uuid in the glance image and then the instance is deleted, the image is worthless right? What is the point of filtering these images out in glance? If we knew the use case then I guess this might make more sense. -- mriedem 2014/03/20

The compute API already automatically stores the instance UUID on the image when it's created via snapshot:

https://github.com/openstack/nova/blob/2014.1.b3/nova/compute/api.py#L1956

So this is handled long before the virt driver is called so blueprint save-instance-id-snapshot is irrelevant.

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.