]> xenbits.xensource.com Git - libvirt.git/commit
qemu: new function to retrieve migration blocker reasons from QEMU
authorEugenio Pérez <eperezma@redhat.com>
Wed, 20 Jul 2022 16:05:47 +0000 (18:05 +0200)
committerLaine Stump <laine@redhat.com>
Thu, 21 Jul 2022 04:58:06 +0000 (00:58 -0400)
commit7e52c4839fabac2d19c6f22c99142e992e3d898e
tree16b6b39d2b5a72d8206b0152831ffa8cc7cf63af
parent1e9d84d9f9513a73572842db30e3d1445e892291
qemu: new function to retrieve migration blocker reasons from QEMU

Since QEMU 6.0, if migration is blocked for some reason,
'query-migrate' will return an array of error strings describing the
migration blockers.  This can be used to check whether there are any
devices, or other conditions, that would cause migration to fail.

This patch adds a function that sends this query via a QMP command and
returns the resulting array of reasons. qemuMigrationSrcIsAllowed()
will be able to use the new function to ask QEMU for migration
blockers, instead of the hardcoded guesses that libvirt currently has.

Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Laine Stump <laine@redhat.com>
src/qemu/qemu_monitor.c
src/qemu/qemu_monitor.h
src/qemu/qemu_monitor_json.c
src/qemu/qemu_monitor_json.h