From 1b93fdbf13c67bd5b0a5efc1306b95f30c64cc34 Mon Sep 17 00:00:00 2001 From: Thuleau Édouard Date: Fri, 2 Sep 2011 17:28:11 +0200 Subject: Add flag 'snapshot_image_format' to select the disk format of the snapshot image generated with the libvirt driver. --- nova/virt/libvirt/connection.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nova/virt/libvirt/connection.py b/nova/virt/libvirt/connection.py index 363a20ed0..8e32ac2c4 100644 --- a/nova/virt/libvirt/connection.py +++ b/nova/virt/libvirt/connection.py @@ -126,6 +126,10 @@ flags.DEFINE_integer('live_migration_bandwidth', 0, 'Define live migration behavior') flags.DEFINE_string('qemu_img', 'qemu-img', 'binary to use for qemu-img commands') +flags.DEFINE_string('snapshot_image_format', 'raw', + 'Snapshot image format (valide option are : ' + 'all format supported by qemu-img binary') + FLAGS.snapshot_disk_format, flags.DEFINE_string('libvirt_vif_type', 'bridge', 'Type of VIF to create.') flags.DEFINE_string('libvirt_vif_driver', @@ -448,7 +452,7 @@ class LibvirtConnection(driver.ComputeDriver): '-f', 'qcow2', '-O', - 'raw', + FLAGS.snapshot_image_format, '-s', snapshot_name, disk_path, -- cgit