I was able to successfully Block Commit using QEMU in Trusty. So the
problem lives likely in libvirt:

#### QEMU (2.0.0+dfsg-2ubuntu1.32)

## HMP CONSOLE

# create a snapshot from "guest.qcow2" to "guestsnap.qcow2"

(qemu) snapshot_blkdev disk0 /var/lib/libvirt/images/guestsnap.qcow2
qcow2

## QMP CONSOLE

# merge the snapshot created back to the base "guest.qcow2"

(qemu) block-commit device=disk0
top=/var/lib/libvirt/images/guestsnap.qcow2

{u'return': {}}

# check block commit statistics

(qemu) query-blockstats (... many times ...)

{u'return': [
{
u'device': u'disk0'
u'backing': {
        u'stats': {
                u'rd_operations': 3522
                u'flush_total_time_ns': 3176656651
                u'wr_highest_offset': 30066015744
                u'rd_total_time_ns': 458556786
                u'rd_bytes': 63168000
                u'wr_total_time_ns': 787756681
                u'flush_operations': 1251
                u'wr_operations': 2787
                u'wr_bytes': 16806912
                }
        u'parent': {
                u'stats': {u'rd_operations': 0
                u'flush_total_time_ns': 0
                u'wr_highest_offset': 2724658688
                u'rd_total_time_ns': 0
                u'rd_bytes': 0
                u'wr_total_time_ns': 0
                u'flush_operations': 0
                u'wr_operations': 0
                u'wr_bytes': 0
                }
        }
}
u'stats': {
        u'rd_operations': 217
        u'flush_total_time_ns': 1331436801
        u'wr_highest_offset': 30065970688
        u'rd_total_time_ns': 127773661
        u'rd_bytes': 2453504
        u'wr_total_time_ns': 60389213087
        u'flush_operations': 376
        u'wr_operations': 1015
        u'wr_bytes': 57905152
}
u'parent': {
        u'stats': {
                u'rd_operations': 0
                u'flush_total_time_ns': 0
                u'wr_highest_offset': 59375104
                u'rd_total_time_ns': 0
                u'rd_bytes': 0
                u'wr_total_time_ns': 0
                u'flush_operations': 0
                u'wr_operations': 0
                u'wr_bytes': 0
                }
        }
}
]}

# check block-commit job status (100% == offset - len)

(qemu) query-block-jobs

{u'return': [{
u'busy': False, 
u'type': u'commit'
u'len': 32212254720
u'paused': False
u'io-status': u'ok'
u'offset': 32212254720
u'device': u'disk0'
u'speed': 0
}]}


## check job was done and pivot was made successfully

(qemu) block-job-complete device=disk0

{u'return': {}}

## check for the block being used for disk0

(qemu) query-block
{'return': [{
'locked': False
'type': 'unknown'
'io-status': 'ok'
'removable': False
'device': 'disk0'
'inserted': {
        'bps_rd': 0
        'backing_file_depth': 0
        'encrypted': False
        'image': {
                'cluster-size': 65536
                'format': 'qcow2'
                'filename': '/var/lib/libvirt/images/guest.qcow2'
                'virtual-size': 32212254720
                'dirty-flag': False
                'format-specific': {
                        'data': {'compat': '1.1'
                        'lazy-refcounts': False
                        }
                'type': 'qcow2'
                }
        'actual-size': 5322117120
        }
'bps_wr': 0
'drv': 'qcow2'
'bps': 0
'iops': 0
'file': '/var/lib/libvirt/images/guest.qcow2'
'iops_rd': 0
'encryption_key_missing': False
'ro': False
'iops_wr': 0
}
}]}

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1317491

Title:
  virsh blockcommit hangs at 100%

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1317491/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to