Merge "Add REUSE_EXT in _swap_volume call to blockRebase"

This commit is contained in:
Jenkins 2013-09-12 20:07:11 +00:00 committed by Gerrit Code Review
commit ddfffc4877

View File

@ -1124,8 +1124,11 @@ class LibvirtDriver(driver.ComputeDriver):
if domain.isPersistent():
domain.undefine()
# Start copy with VIR_DOMAIN_REBASE_REUSE_EXT flag to
# allow writing to existing external volume file
domain.blockRebase(disk_path, new_path, 0,
libvirt.VIR_DOMAIN_BLOCK_REBASE_COPY)
libvirt.VIR_DOMAIN_BLOCK_REBASE_COPY |
libvirt.VIR_DOMAIN_BLOCK_REBASE_REUSE_EXT)
while self._wait_for_block_job(domain, disk_path):
time.sleep(0.5)