|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] Rlibxl: refuse to try and migrate an HVM guest using qemu-xen
On Fri, 2012-06-29 at 17:03 +0100, Ian Jackson wrote:
> Ian Campbell writes ("[PATCH] Rlibxl: refuse to try and migrate an HVM guest
> using qemu-xen"):
> > > I think we should add an appropriate error message as a blocker. We
> > > should also try to fix this on the QEMU side, but given that the QEMU
> > > 1.0 stable tree is pretty much unmaintaned, we won't be able to backport
> > > the fix there, so we cannot be sure that a distro will end up with a
> > > QEMU with or without the fix.
> >
> > How about this for the time being, we can always revert or enhance as
> > necessary before 4.2.
> ...
> > + libxl_device_model_version dm =
> > + libxl__device_model_version_running(gc, domid);
>
> libxl__device_model_version_running can return -1. (Its error
> handling is pretty bad but that's no excuse for making matters worse.)
> I suggest we retcon it as returning a libxl error code.
the current callers all do something like
switch (libxl__device_model_version_running(gc, domid)) {
case LIBXL_DEVICE_MODEL...
...
default: return ERROR_INVAL;
}
and would need some rejigging to support a switch to ERROR_*, and
associated chance of triggering gcc's switch(enum) warnings.
I think fixing this properly can be left to 4.3 and for now I'll just
follow this same pattern.
Ian.
# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1341227605 -3600
# Node ID c6a2abdee84d5ae0692728dc169327314991090a
# Parent d29a88850da26424b52520a617ca449d49124143
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@xxxxxxxxxx>
diff -r d29a88850da2 -r c6a2abdee84d tools/libxl/libxl.c
--- a/tools/libxl/libxl.c Mon Jul 02 12:06:22 2012 +0100
+++ b/tools/libxl/libxl.c Mon Jul 02 12:13:25 2012 +0100
@@ -746,6 +746,22 @@ int libxl_domain_suspend(libxl_ctx *ctx,
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;
+ default:
+ rc = ERROR_FAIL;
+ goto out_err;
+ }
+ }
+
libxl__domain_suspend_state *dss;
GCNEW(dss);
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |