Libvirt/KVM snapshot only in RAW image format
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
Édouard Thuleau |
Bug Description
With the virt driver Libvirt, the snapshot of an instance is convert into RAW disk format even if the original image is a QCow2 image.
Furthermore, the new image created by a snapshot take same 'disk_format' and 'container_format' as the original image. For example, a QCow2 image is instantiated and a snapshot of this image is created. The snapshot image is in RAW format but the metadata 'disk_format' of the snapshot image is 'QCow2'
I think, nova-compute should not convert the image for a snapshot. If the image is in QCow2 format, snapshots are in QCow2 format also. If the image is in RAW format, the snapshots are in RAW format also.
Perhaps, we can add a flag to force the snapshot format.
Related question: https:/
I tested to change the command 'qemu-img convert' by : 'qemu_img_cmd = (FLAGS.qemu_img, 'convert', '-f', 'qcow2', '-O', 'qcow2', '-s', snapshot_name, disk_path, out_path)' in method 'snapshot' of class 'LibvirtConnect
Related branches
- OpenStack release team: Pending requested
-
Diff: 173 lines (+84/-44)2 files modifiednova/tests/test_libvirt.py (+71/-33)
nova/virt/libvirt/connection.py (+13/-11)
- Brian Lamar (community): Approve
- Mark McLoughlin (community): Approve
- Todd Willey (community): Approve
-
Diff: 173 lines (+84/-44)2 files modifiednova/tests/test_libvirt.py (+71/-33)
nova/virt/libvirt/connection.py (+13/-11)
Changed in nova: | |
importance: | Undecided → Medium |
status: | New → Triaged |
Changed in nova: | |
assignee: | nobody → Doude (doude) |
Changed in nova: | |
status: | Triaged → In Progress |
Changed in nova: | |
milestone: | none → 2011.3 |
status: | In Progress → Fix Committed |
Changed in nova: | |
status: | Fix Committed → Fix Released |
I try to create patch for this bug.
What do you think about that patch ? About test flag ?
I'm not a developer so I prefer to have developer opinion before I prose it to merge.