From: Ian Campbell Subject: [PATCH] Rlibxl: refuse to try and migrate an HVM guest using qemu-xen Date: Fri, 29 Jun 2012 17:01:42 +0100 Message-ID: <1340985702.10942.136.camel@zakaz.uk.xensource.com> References: <20461.36759.685003.44867@mariner.uk.xensource.com> <1340970454.10942.97.camel@zakaz.uk.xensource.com> <1340973172.10942.98.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Stefano Stabellini Cc: Anthony Perard , "xen-devel@lists.xensource.com" , Ian Jackson List-Id: xen-devel@lists.xenproject.org > 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. 8<---------------------- # HG changeset patch # User Ian Campbell # Date 1340985595 -3600 # Node ID a0c1c8c585e03279f9ea149bc2951d0df900717e # Parent d849ca2ef197dbf0e731aa4726da0eb3e2801280 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 diff -r d849ca2ef197 -r a0c1c8c585e0 tools/libxl/libxl.c --- a/tools/libxl/libxl.c Fri Jun 29 15:57:28 2012 +0100 +++ b/tools/libxl/libxl.c Fri Jun 29 16:59:55 2012 +0100 @@ -746,6 +746,17 @@ int libxl_domain_suspend(libxl_ctx *ctx, goto out_err; } + libxl_device_model_version dm = + libxl__device_model_version_running(gc, domid); + if (type == LIBXL_DOMAIN_TYPE_HVM && + dm == LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN && + flags & LIBXL_SUSPEND_LIVE) { + LOG(ERROR, "cannot live migrate HVM domains with qemu-xen device-model"); + rc = ERROR_FAIL; + goto out_err; + + } + libxl__domain_suspend_state *dss; GCNEW(dss);