summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThuleau Édouard <thuleau@gmail.com>2011-09-02 17:28:11 +0200
committerThuleau Édouard <thuleau@gmail.com>2011-09-02 17:28:11 +0200
commit1b93fdbf13c67bd5b0a5efc1306b95f30c64cc34 (patch)
tree64d7e4b6938bfb3a1ab8bdd69d56e62c36e94b65
parentd80dc5bbbd1781bd33d9f69b608014e9cc2e41a3 (diff)
downloadnova-1b93fdbf13c67bd5b0a5efc1306b95f30c64cc34.tar.gz
nova-1b93fdbf13c67bd5b0a5efc1306b95f30c64cc34.tar.xz
nova-1b93fdbf13c67bd5b0a5efc1306b95f30c64cc34.zip
Add flag 'snapshot_image_format' to select the disk format of the snapshot image generated with the libvirt driver.
-rw-r--r--nova/virt/libvirt/connection.py6
1 files changed, 5 insertions, 1 deletions
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,