
On 7/13/20 10:20 AM, Michal Privoznik wrote:
On 7/13/20 11:49 AM, Daniel Henrique Barboza wrote:
This document describes briefly how Libvirt migration internals works, complementing the info available in migration.html.in.
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com> --- docs/kbase/migrationinternals.rst | 174 ++++++++++++++++++++++++++++++ 1 file changed, 174 insertions(+) create mode 100644 docs/kbase/migrationinternals.rst
diff --git a/docs/kbase/migrationinternals.rst b/docs/kbase/migrationinternals.rst new file mode 100644 index 0000000000..869ee99bd7 --- /dev/null +++ b/docs/kbase/migrationinternals.rst @@ -0,0 +1,174 @@ +=========================== +Libvirt migration internals +=========================== + +.. contents:: + +Migration is a multi-step operation with at least two distinct actors, +the source and the destination libvirtd daemons, and a lot of failure +points. This document describes the basic migration workflow in the +code level, as a way to complement `the base migration docs <migration.html>`_ +and help developers to get up to speed quicker with the code. + +In this document, unless stated otherwise, these conventions are followed: + +* 'user' refers to any entity that initiates a migration, regardless of being + an human using 'virsh' or a program consuming the Libvirt API; + +* 'source' refers to the source host of the migration, where the guest currently + exists; + +* 'destination' refers to the destination host of the migration. As of + Libvirt 6.5.0 local migration isn't supported, thus source and destination + refers to different hosts;
Is this right? What commit is reponsible for this change?
I guess my wording here is unclear. What I wanted to say is that, at least up to the current release we're at now (6.5.0), localhost migration (i.e. source and destination is the same host) isn't supported. I wanted to mention it this way because there's always the chance that Libvirt comes around and implements it. If you want a commit id, the error message warning about localhost migration appeared first here: commit 8654175c5b0c3db9e5f70907f102f0f900355d28 Author: Daniel P. Berrange <berrange@redhat.com> Date: Mon Jan 24 18:06:16 2011 +0000 Introduce migration cookies to QEMU driver (...) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -46,0 +196,10 @@ + qemuReportError(VIR_ERR_INTERNAL_ERROR, + "%s", _("missing hostuuid element in migration data")); + goto error; + } + virUUIDFormat(mig->hostuuid, uuidstr); + if (STREQ(tmp, uuidstr)) { + qemuReportError(VIR_ERR_INTERNAL_ERROR, + _("Attempt to migrate guest to the same host %s"), + tmp); + goto error;
Michal