summaryrefslogtreecommitdiffstats
path: root/nova
diff options
context:
space:
mode:
authorJim Fehlig <jfehlig@suse.com>2012-05-10 13:20:20 -0700
committerJim Fehlig <jfehlig@suse.com>2012-05-11 07:30:56 -0700
commitde5cb27e64267ec59e12a495a59880412cecb5e8 (patch)
tree7a71a66b70077a5c38ae660be078e61c780eeb57 /nova
parentbf6673a5952ed59ed55d504938d195083e23a2ce (diff)
Use default qemu-img cluster size in libvirt connection driver
The recommended cluster size [1] for qcow2 is 64k, which is the default when invoking 'qemu-img create ...'. Remove the cluster_size option from qemu-img invocation. [1] http://www.mail-archive.com/openstack@lists.launchpad.net/msg11371.html V2: Fix test. Change-Id: Iafc290720a820cb5f57ded10a2f584fdc5cd5b49
Diffstat (limited to 'nova')
-rw-r--r--nova/tests/test_libvirt.py2
-rw-r--r--nova/virt/libvirt/utils.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/nova/tests/test_libvirt.py b/nova/tests/test_libvirt.py
index 2391ea1ea..11e51b8a6 100644
--- a/nova/tests/test_libvirt.py
+++ b/nova/tests/test_libvirt.py
@@ -2201,7 +2201,7 @@ class LibvirtUtilsTestCase(test.TestCase):
def test_create_cow_image(self):
self.mox.StubOutWithMock(utils, 'execute')
utils.execute('qemu-img', 'create', '-f', 'qcow2',
- '-o', 'cluster_size=2M,backing_file=/some/path',
+ '-o', 'backing_file=/some/path',
'/the/new/cow')
# Start test
self.mox.ReplayAll()
diff --git a/nova/virt/libvirt/utils.py b/nova/virt/libvirt/utils.py
index f4c6d20a5..bb2051927 100644
--- a/nova/virt/libvirt/utils.py
+++ b/nova/virt/libvirt/utils.py
@@ -87,7 +87,7 @@ def create_cow_image(backing_file, path):
:param path: Desired location of the COW image
"""
execute('qemu-img', 'create', '-f', 'qcow2', '-o',
- 'cluster_size=2M,backing_file=%s' % backing_file, path)
+ 'backing_file=%s' % backing_file, path)
def get_disk_size(path):