Bug 1398599

Summary: virsh domjobinfo storage migration progress
Product: [Community] Virtualization Tools Reporter: Ruben Kerkhof <ruben>
Component: libvirtAssignee: Jiri Denemark <jdenemar>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: agedosier, berrange, clalancette, itamar, jdenemar, laine, libvirt-maint, rbalakri, veillard, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libvirt-3.8.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-09-08 15:32:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Ruben Kerkhof 2016-11-25 11:49:02 UTC
As discussed on the libvirt mailing list (https://www.redhat.com/archives/libvir-list/2016-November/msg01270.html), 'virsh domjobinfo' used to provide progress info for storage migration:

Job type:         Unbounded
Time elapsed:     1830632      ms
Data processed:   37.212 GiB
Data remaining:   1.025 GiB
Data total:       16.016 GiB
Memory processed: 37.212 GiB
Memory remaining: 1.025 GiB
Memory total:     16.016 GiB
Memory bandwidth: 100.018 MiB/s
Constant pages:   618279
Normal pages:     9734623
Normal data:      37.135 GiB
Expected downtime: 1118         ms
Setup time:       61           ms

It doesn't anymore for qemu-kvm versions that do use nbd, but don't support migration events:

$ sudo virsh domjobinfo 58358fec-c35c-4a7a-a4dd-18ec2e1327bf
Job type:         Unbounded
Time elapsed:     209616       ms

Comment 1 Jiri Denemark 2017-09-08 15:32:53 UTC
This was implemented upstream by Nikolay Shirokovskiy in the "qemu: migration: show disks stats for nbd migration" series. The following is the most interesting commit from the series:

commit 8c4665833750c66b435634678d0df2b71273e177
Refs: v3.7.0-28-g8c46658337
Author:     Nikolay Shirokovskiy <nshirokovskiy>
AuthorDate: Fri Sep 1 09:49:30 2017 +0300
Commit:     Jiri Denemark <jdenemar>
CommitDate: Thu Sep 7 11:18:10 2017 +0200

    qemu: migrate: add mirror stats to migration stats

    When getting job info in case mirror does not reach ready phase
    fetch mirror stats from qemu. Otherwise mirror stats are already
    saved in current job.

    Signed-off-by: Jiri Denemark <jdenemar>