Hi On Thu, Feb 20, 2020 at 10:04 AM Michal Privoznik <mprivozn@xxxxxxxxxx> wrote: > > On 1/14/20 2:46 PM, marcandre.lureau@xxxxxxxxxx wrote: > > From: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx> > > > > Helper processes may have their state migrated with QEMU data stream > > thanks to the QEMU "dbus-vmstate". > > > > libvirt maintains the list of helpers to be migrated. The > > "dbus-vmstate" is added when required, and given the list of helper > > Ids that must be migrated, on save & load sides. > > > > See also: > > https://git.qemu.org/?p=qemu.git;a=blob;f=docs/interop/dbus-vmstate.rst > > > > Signed-off-by: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx> > > --- > > src/qemu/qemu_alias.c | 7 +++ > > src/qemu/qemu_alias.h | 2 + > > src/qemu/qemu_command.c | 62 +++++++++++++++++++++++++++ > > src/qemu/qemu_command.h | 3 ++ > > src/qemu/qemu_dbus.c | 14 ++++++ > > src/qemu/qemu_dbus.h | 4 ++ > > src/qemu/qemu_domain.c | 10 +++++ > > src/qemu/qemu_domain.h | 5 +++ > > src/qemu/qemu_hotplug.c | 82 ++++++++++++++++++++++++++++++++++++ > > src/qemu/qemu_hotplug.h | 8 ++++ > > src/qemu/qemu_migration.c | 51 ++++++++++++++++++++++ > > src/qemu/qemu_monitor.c | 21 +++++++++ > > src/qemu/qemu_monitor.h | 3 ++ > > src/qemu/qemu_monitor_json.c | 15 +++++++ > > src/qemu/qemu_monitor_json.h | 5 +++ > > 15 files changed, 292 insertions(+) > > > > > > diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c > > index 71d0bb0879..8c281f3a70 100644 > > --- a/src/qemu/qemu_migration.c > > +++ b/src/qemu/qemu_migration.c > > @@ -1125,10 +1125,18 @@ qemuMigrationSrcIsAllowed(virQEMUDriverPtr driver, > > bool remote, > > unsigned int flags) > > { > > + qemuDomainObjPrivatePtr priv = vm->privateData; > > int nsnapshots; > > int pauseReason; > > size_t i; > > > > + if (virStringListLength((const char **)priv->dbusVMStateIds) && > > + !virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_DBUS_VMSTATE)) { > > + virReportError(VIR_ERR_OPERATION_INVALID, "%s", > > + _("cannot migrate this domain without dbus-vmstate support")); > > + return false; > > + } > > + > > This should be done in the if(!OFFLINE) a few lines below. IIUC, vmstate > is runtime thing, and when doing offline migration (e.g. just copying > over disks and XMLs), no qemu is involved and thus no vmstate matters. Right, thanks > > > /* perform these checks only when migrating to remote hosts */ > > if (remote) { > > nsnapshots = virDomainSnapshotObjListNum(vm->snapshots, NULL, 0); > > Michal >