diff options
| author | termie <github@anarkystic.com> | 2011-04-18 05:06:11 +0000 |
|---|---|---|
| committer | Tarmac <> | 2011-04-18 05:06:11 +0000 |
| commit | 03840792687b915d9ffdced12f415b3d093b40b2 (patch) | |
| tree | 3831779f068788207ca04af7f6be1c2f80e66814 | |
| parent | cf7a7195cabbe3a5ed7e113552ed73adcafb5da4 (diff) | |
| parent | dbb0ff6b7720d4715d26b470f0ee39f27b1e187c (diff) | |
The change to utils.execute's call style missed this call somehow, this should get libvirt snapshots working again.
| -rw-r--r-- | nova/virt/libvirt_conn.py | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/nova/virt/libvirt_conn.py b/nova/virt/libvirt_conn.py index 9e815799f..5da091920 100644 --- a/nova/virt/libvirt_conn.py +++ b/nova/virt/libvirt_conn.py @@ -58,7 +58,6 @@ from nova import db from nova import exception from nova import flags from nova import log as logging -#from nova import test from nova import utils from nova import vnc from nova.auth import manager @@ -471,8 +470,8 @@ class LibvirtConnection(driver.ComputeDriver): metadata = {'disk_format': base['disk_format'], 'container_format': base['container_format'], 'is_public': False, + 'name': '%s.%s' % (base['name'], image_id), 'properties': {'architecture': base['architecture'], - 'name': '%s.%s' % (base['name'], image_id), 'kernel_id': instance['kernel_id'], 'image_location': 'snapshot', 'image_state': 'available', @@ -499,12 +498,17 @@ class LibvirtConnection(driver.ComputeDriver): # Export the snapshot to a raw image temp_dir = tempfile.mkdtemp() out_path = os.path.join(temp_dir, snapshot_name) - qemu_img_cmd = '%s convert -f qcow2 -O raw -s %s %s %s' % ( - FLAGS.qemu_img, - snapshot_name, - disk_path, - out_path) - utils.execute(qemu_img_cmd) + qemu_img_cmd = (FLAGS.qemu_img, + 'convert', + '-f', + 'qcow2', + '-O', + 'raw', + '-s', + snapshot_name, + disk_path, + out_path) + utils.execute(*qemu_img_cmd) # Upload that image to the image service with open(out_path) as image_file: |
