From nobody Sun Feb 8 21:29:18 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1652196201; cv=none; d=zohomail.com; s=zohoarc; b=Igvgc1D3kkbFzsBiqpXIuPZFa05MWrdaBDtH22Xlcjb6GX+CCrJVpgqV8WhI7JIPqRcyYy9rO/SBz+yfnW+cTX8rBAdMRngLwekdICBCQ/ot14mapRg2XksKvUaxFWgHEb6rUzDlZD5sOprkiJehj6qCS6bODnopXh9GH6aUJZ4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1652196201; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=5m+OcC8GLn9ecwZCzbIMLBTw3MEvyFgjoL6sEgiwMKQ=; b=iST2h1OOeaRjuZTnQlnX71mAJyt8cIeZFfQnLuVVjU26hYPk7/XnIy32oT9MBwWlSQoUw7b44j92MX4qJp2GwO3e8cvV2QJT0uA+P7GxxkjwpryWh4bkV937Kd/EZ2kL+VThZF54jFrAlzQGTkwmF9jKgBsP2rZUkiBP3F1UG+0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1652196201723347.95917871366703; Tue, 10 May 2022 08:23:21 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-609-f_DizcOhOfGH2MG-l42-Iw-1; Tue, 10 May 2022 11:23:06 -0400 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 413D11066570; Tue, 10 May 2022 15:22:15 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2690D54B085; Tue, 10 May 2022 15:22:15 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 541D31947B99; Tue, 10 May 2022 15:22:06 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 6F509194706E for ; Tue, 10 May 2022 15:21:49 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 57EE340D1B9F; Tue, 10 May 2022 15:21:49 +0000 (UTC) Received: from virval.usersys.redhat.com (unknown [10.43.2.187]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 385E24035782 for ; Tue, 10 May 2022 15:21:49 +0000 (UTC) Received: by virval.usersys.redhat.com (Postfix, from userid 500) id B3FC524461F; Tue, 10 May 2022 17:21:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1652196200; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=5m+OcC8GLn9ecwZCzbIMLBTw3MEvyFgjoL6sEgiwMKQ=; b=eSqZa7QgTyRXzSIZO65MBiCWQoYT78oHcJF5g5cRpGi07UW+ww7B+x63AxRvDi1B4WMzNc cye7LKEnea8u9Xvn6qOThOcXnPzOZafeuEXJSLbPohoVBTTH6UY+i9qOnmwsuJdtgr39PG bF/0YPrFVZvOtLsTKAM49h5tpne9UPE= X-MC-Unique: f_DizcOhOfGH2MG-l42-Iw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 51/80] Introduce VIR_MIGRATE_POSTCOPY_RESUME flag Date: Tue, 10 May 2022 17:21:12 +0200 Message-Id: <48eed84ca99284f2ae9994cf20c38806281bc1cb.1652196064.git.jdenemar@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.11.54.2 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1652196202825100009 Content-Type: text/plain; charset="utf-8" This flag can be used to restart post-copy migration once it failed because of a broken connection. Signed-off-by: Jiri Denemark Reviewed-by: Peter Krempa --- include/libvirt/libvirt-domain.h | 5 +++++ src/libvirt-domain.c | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-dom= ain.h index 34b8adc2bf..aee2b49114 100644 --- a/include/libvirt/libvirt-domain.h +++ b/include/libvirt/libvirt-domain.h @@ -1084,6 +1084,11 @@ typedef enum { */ VIR_MIGRATE_NON_SHARED_SYNCHRONOUS_WRITES =3D (1 << 18), =20 + /* Resume migration which failed in post-copy phase. + * + * Since: 8.4.0 + */ + VIR_MIGRATE_POSTCOPY_RESUME =3D (1 << 19), } virDomainMigrateFlags; =20 =20 diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index 2e39687e27..41ba4aa39c 100644 --- a/src/libvirt-domain.c +++ b/src/libvirt-domain.c @@ -9762,6 +9762,12 @@ virDomainMigrateGetMaxSpeed(virDomainPtr domain, * in such case. Because of this, libvirt will refuse to cancel post-copy * migration via virDomainAbortJob. * + * Failed post-copy migration can be recovered once the cause for the fail= ure + * (e.g., a network issue) is resolved by repeating the migration with an + * additional VIR_MIGRATE_POSTCOPY_RESUME flag. This will recreate the + * connection and resume migration from the point where it failed. This st= ep + * can be repeated in case the migration breaks again. + * * The following domain life cycle events are emitted during post-copy * migration: * VIR_DOMAIN_EVENT_SUSPENDED_POSTCOPY (on the source) -- migration enter= ed --=20 2.35.1