Read-only mirror. Please submit merge requests / issues to https://gitlab.com/libvirt/libvirt
Go to file
Daniel P. Berrange 65043d2dff Introduce yet another migration version in API.
Migration just seems to go from bad to worse. We already had to
introduce a second migration protocol when adding the QEMU driver,
since the one from Xen was insufficiently flexible to cope with
passing the data the QEMU driver required.

It turns out that this protocol still has some flaws that we
need to address. The current sequence is

 *  Src: DumpXML
          - Generate XML to pass to dst

 *  Dst: Prepare
          - Get ready to accept incoming VM
          - Generate optional cookie to pass to src

 *  Src: Perform
          - Start migration and wait for send completion
          - Kill off VM if successful, resume if failed

 *  Dst: Finish
          - Wait for recv completion and check status
          - Kill off VM if unsuccessful

The problems with this are:

 - Since the first step is a generic 'DumpXML' call, we can't
   add in other migration specific data. eg, we can't include
   any VM lease data from lock manager plugins
 - Since the first step is a generic 'DumpXML' call, we can't
   emit any 'migration begin' event on the source, or have
   any hook that runs right at the start of the process
 - Since there is no final step on the source, if the Finish
   method fails to receive all migration data & has to kill
   the VM, then there's no way to resume the original VM
   on the source

This patch attempts to introduce a version 3 that uses the
improved 5 step sequence

 *  Src: Begin
          - Generate XML to pass to dst
          - Generate optional cookie to pass to dst

 *  Dst: Prepare
          - Get ready to accept incoming VM
          - Generate optional cookie to pass to src

 *  Src: Perform
          - Start migration and wait for send completion
          - Generate optional cookie to pass to dst

 *  Dst: Finish
          - Wait for recv completion and check status
          - Kill off VM if failed, resume if success
          - Generate optional cookie to pass to src

 *  Src: Confirm
          - Kill off VM if success, resume if failed

The API is designed to allow both input and output cookies
in all methods where applicable. This lets us pass around
arbitrary extra driver specific data between src & dst during
migration. Combined with the extra 'Begin' method this lets
us pass lease information from source to dst at the start of
migration

Moving the killing of the source VM out of Perform and
into Confirm, means we can now recover if the dst host
can't successfully Finish receiving migration data.
2011-05-16 15:09:19 +01:00
.gnulib@64a5e38bce maint: avoid a couple of gnulib regressions 2011-05-11 12:03:45 -06:00
daemon Wire protocol format and remote driver for virDomainGetState 2011-05-16 10:04:19 +02:00
docs Introduce yet another migration version in API. 2011-05-16 15:09:19 +01:00
examples build: avoid gcc preprocessor extensions 2011-05-11 13:28:50 -06:00
include virDomainGetState public API 2011-05-16 10:04:18 +02:00
m4 tests: Lower stack usage below 4096 bytes 2011-04-30 19:59:52 +02:00
po maint: omit translation for all VIR_INFO 2011-05-11 15:20:33 -06:00
python virDomainGetState public API 2011-05-16 10:04:18 +02:00
src Introduce yet another migration version in API. 2011-05-16 15:09:19 +01:00
tests test: all test_scripts should be part of tarball when building without libvirtd 2011-05-14 13:46:00 +08:00
tools virsh: Prefer virDomainGetState over virDomainGetInfo 2011-05-16 10:04:19 +02:00
.dir-locals.el maint: make spacing in .sh files easier 2011-03-14 21:57:42 -06:00
.gitignore build: Remove all generated RPC files from GIT 2011-05-06 16:22:33 -06:00
.gitmodules make .gnulib a submodule 2009-07-08 16:17:51 +02:00
.mailmap build: fix syntax-check failure 2011-04-20 17:17:56 -06:00
AUTHORS Add warning message to XML definition files stored on disk 2011-05-06 16:48:52 +02:00
autobuild.sh Remove the Open Nebula driver 2011-03-28 14:09:11 +01:00
autogen.sh build: avoid problems with autogen.sh runs from tarball 2011-02-12 06:28:28 -07:00
bootstrap maint: avoid a couple of gnulib regressions 2011-05-11 12:03:45 -06:00
bootstrap.conf Pull in gnulib fnmatch module 2011-05-09 16:10:46 +01:00
cfg.mk domain_event: Add virDomainEventState structure 2011-05-13 10:48:32 -04:00
ChangeLog-old generate ChangeLog from git logs into distribution tarball 2009-07-08 16:17:51 +02:00
configure.ac configure: Fix mpath check on non-Linux systems 2011-05-14 06:40:01 +02:00
COPYING.LIB remove all trailing blank lines 2009-07-16 15:06:42 +02:00
HACKING maint: rename virBufferVSprintf to virBufferAsprintf 2011-05-05 13:47:40 -06:00
libvirt.pc.in * libvirt.pc.in: applied patch from Daniel Berrange to fix --cflags 2006-03-24 13:18:12 +00:00
libvirt.spec.in Release of libvirt-0.9.1 2011-05-05 11:25:13 +08:00
Makefile.am Re-add libvirt.spec to tarball to allwo "make rpm" 2011-05-09 14:23:19 +08:00
Makefile.nonreentrant Ban use of all inet_* functions 2010-10-22 11:59:23 +01:00
mingw32-libvirt.spec.in Remove iohelper on Win32 since it is not required 2011-03-31 17:41:51 +01:00
README Correct typos in the documentation (Atsushi SAKAI) 2008-01-24 10:15:13 +00:00
README-hacking maint: relax git minimum version 2010-02-24 14:29:27 -05:00
TODO Update todo list file to point at bugzilla/website 2010-10-13 16:45:26 +01:00

         LibVirt : simple API for virtualization

  Libvirt is a C toolkit to interact with the virtualization capabilities
of recent versions of Linux (and other OSes). It is free software
available under the GNU Lesser General Public License. Virtualization of
the Linux Operating System means the ability to run multiple instances of
Operating Systems concurrently on a single hardware system where the basic
resources are driven by a Linux instance. The library aim at providing
long term stable C API initially for the Xen paravirtualization but
should be able to integrate other virtualization mechanisms if needed.

Daniel Veillard <veillard@redhat.com>