Commit 43dc4648 by Guba Sándor

resize_disk hotfix to work with libvirt version < 0.9.11

parent a3b9d6ce
...@@ -588,8 +588,10 @@ def detach_network(name, net): ...@@ -588,8 +588,10 @@ def detach_network(name, net):
@wrap_libvirtError @wrap_libvirtError
def resize_disk(name, path, size): def resize_disk(name, path, size):
domain = lookupByName(name) domain = lookupByName(name)
domain.blockResize(path, int(size), # domain.blockResize(path, int(size),
flags=libvirt.VIR_DOMAIN_BLOCK_RESIZE_BYTES) # flags=libvirt.VIR_DOMAIN_BLOCK_RESIZE_BYTES)
# To be compatible with libvirt < 0.9.11
domain.blockResize(path, int(size)/1024)
@celery.task @celery.task
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment