diff options
author | Ian Campbell <Ian.Campbell@citrix.com> | 2012-07-25 17:39:14 +0100 |
---|---|---|
committer | Ian Campbell <Ian.Campbell@citrix.com> | 2012-07-25 17:39:14 +0100 |
commit | ce69d835796fec395c328081d0c9e017ee6e52f2 (patch) | |
tree | b6ef47b0441e0188c76bf4af30155e96894fd22b /tools | |
parent | f2c89c53c44d9d8adbba43db6f02701c8b155383 (diff) | |
download | xen-ce69d835796fec395c328081d0c9e017ee6e52f2.tar.gz xen-ce69d835796fec395c328081d0c9e017ee6e52f2.tar.bz2 xen-ce69d835796fec395c328081d0c9e017ee6e52f2.zip |
libxl: refuse to try and migrate an HVM guest using qemu-xen
libxl/qemu-upstream currently do not collude together to enable log-dirty mode
and therefore migrations are unsafe. Refuse to even try for now.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/libxl/libxl.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index 7e8bf45cf5..7b99165948 100644 --- a/tools/libxl/libxl.c +++ b/tools/libxl/libxl.c @@ -765,6 +765,23 @@ int libxl_domain_suspend(libxl_ctx *ctx, uint32_t domid, int fd, int flags, goto out_err; } + if (type == LIBXL_DOMAIN_TYPE_HVM && flags & LIBXL_SUSPEND_LIVE) { + switch (libxl__device_model_version_running(gc, domid)) { + case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN: + LOG(ERROR, + "cannot live migrate HVM domains with qemu-xen device-model"); + rc = ERROR_FAIL; + goto out_err; + case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN_TRADITIONAL: + /* No problem */ + break; + case -1: + rc = ERROR_FAIL; + goto out_err; + default: abort(); + } + } + libxl__domain_suspend_state *dss; GCNEW(dss); |