]> xenbits.xensource.com Git - xen.git/commit
xl: Migration support
authorKeir Fraser <keir.fraser@citrix.com>
Mon, 12 Apr 2010 16:47:16 +0000 (17:47 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Mon, 12 Apr 2010 16:47:16 +0000 (17:47 +0100)
commit4cdb003c2d6b044ebdd981fe0240ed6a9eddbe47
tree1c0bb7cb90a6f2baa2ac3fdd14494c7eb17ad2a8
parentc31aaf24cd7711a4c5d78d9e821f7a37d15829f7
xl: Migration support

Implement "xl migrate".

ssh is used as the transport by default, although this can be
overridden by specifying a different sshcommand.  This is a very
standard approach nowadays and avoids the need for daemons at the
target host in the default configuration, while providing flexibility
to admins.  (In the future it might be nice to support plain
unencrypted migration over TCP, which we do not rule out now, although
it is not currently implemented.)

Properties of the migration protocol:
  * The domain on the target machine is named "<domname>--incoming"
    while it is being transferred.
  * The domain on the source machine is renamed
  "<domain>--migratedaway"
    before we give the target permission to rename and unpause.
  * The locking in libxl_domain_rename ensures that of two
    simultaneous migration attempts no more than one will succeed.
  * We go to some considerable effort to avoid leaving the domain in
    a bad state if something goes wrong with one of the ends or the
    network, although there is still (inevitably) a possibility of a
    unresolvable state (in case of very badly timed network failure)
    which is probably best resolved by destroying the domain at both
    ends.

Incidental changes:
  create_domain now returns a libxl error code rather than exiting on
  error.
  New ERROR_BADFAIL error code for reporting unpleasant failures.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
tools/libxl/libxl.h
tools/libxl/xl.c