[libvirt] 回复:How do I get the progress of a long operation

Eric Blake eblake at redhat.com
Mon Nov 10 18:24:05 UTC 2014

On 11/10/2014 09:37 AM, windy wrote:
> Hi All:

[please don't top-post on technical lists; also, please configure your
mailer to wrap long lines]

>     In recent days, I have studied the libvirt event model, but found nothing I wanted.
>     In my requirement, I want to get the progress of long operations,especially snapshot taking and revcovering.

I already told you that we don't have very good job support for some
long-running jobs, and that one such long-running job is that of taking
an internal snapshot.  Patches are welcome.

>     Today, I studied how virsh migrate command realised, I found that the process of migration is getted by job infomation.
> But when i taking snapshot the domain's control state is VIR_DOMAIN_CONTROL_OCCUPIED, not expected VIR_DOMAIN_CONTROL_JOB status,

Yes, because we don't yet have the ability to interrupt a snapshot
creation task.  Job control can only be probed for jobs that have been
wired up to the asynchronous job framework, and taking an internal
snapshot does not yet fit that framework (and it is more than just
libvirt that needs patching; qemu itself does not have a way to
interrupt the HMP 'savevm' command, and does not have a QMP counterpart

> So i can't get any job information(all values are zero).
>     Are there any other methods to get the progress of long operation?

It depends on the job you want to interrupt.

Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 539 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20141110/46e4a3eb/attachment-0001.sig>

More information about the libvir-list mailing list