From nobody Tue Feb 10 11:23:59 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=1680788166; cv=none; d=zohomail.com; s=zohoarc; b=OaJWii10HtVnInW+bo0MDBuAxXqsLAam8QGso5cTp8bTfNPwkAOnmuipzFSay+7ArutQldpBLnXbzJuQZU1D5NDOyQya9W3aLifF6lJRUM+JC+yb9VuddE1JCOMekAF4VtXcT3F0yN36wlzleeGtUNkWWxEFBI9nZmGCfCutRQ0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1680788166; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=w+551jaHaLFjyB+UEG8n/RaiCV/bcl4KihORll5ItuU=; b=JmrzvMHmGiv97xqyHAN9AOKUuKyW1CU+77o0np9RAk5mlwQER8xErm0B9ZZyNAjVMCvXFiabnfQiB4xZloSfyuVMer6I1znv1fZWin2hrSLbY/qqppIirQnCIxKiQyHJWJuvnNiP8RofSOyADgWgjt/b/3glgjy4dOPXhhd49iM= 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 1680788166886117.52972346923946; Thu, 6 Apr 2023 06:36:06 -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-647-ydzudLwnN6y3xEs-tnaWZg-1; Thu, 06 Apr 2023 09:36:04 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id AE114858F0E; Thu, 6 Apr 2023 13:36:01 +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 9B7402166B2A; Thu, 6 Apr 2023 13:36:01 +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 42E3F194658F; Thu, 6 Apr 2023 13:36:01 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id ACD5B1946587 for ; Thu, 6 Apr 2023 13:35:59 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 9080A440D7; Thu, 6 Apr 2023 13:35:59 +0000 (UTC) Received: from speedmetal.lan (unknown [10.45.242.15]) by smtp.corp.redhat.com (Postfix) with ESMTP id 19FB718EC7 for ; Thu, 6 Apr 2023 13:35:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1680788165; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=w+551jaHaLFjyB+UEG8n/RaiCV/bcl4KihORll5ItuU=; b=QCYzXEQaYL0dBdpgGtsTJk+diBp6346dbbWdqLYw87Awjni4xW6bo74j8Q2U13OYZGJFLF BHz2dOt1nwbmQfgGEVxZY5qMaLB8z7QjKMuvrgDEG++5dN7/XaRHV22x1hP/LpUyDjc834 kCsnLUKOn5STyrRS05G/WvnEc1QhT3E= X-MC-Unique: ydzudLwnN6y3xEs-tnaWZg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH] qemu: snapshot: Allow inactive internal snapshots with uefi Date: Thu, 6 Apr 2023 15:35:58 +0200 Message-Id: <7c97358002f64af64c3d465976d7ed4426453f7f.1680788158.git.pkrempa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 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 3.1 on 10.11.54.6 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: 1680788167514100001 Content-Type: text/plain; charset="utf-8" Historically the snapshot code attempted to forbid internal snapshots with UEFI both in active and inactive case. Unfortunately due to the intricacies of UEFI probing this didn't really work for inactive VMs which made users rely on the feature. Now with the changes to store detected UEFI environment also in the inactive definition this broke the feature for those users. Since the varstore doesn't really change that much in the lifecycle of a VM it usually is okay to simply leave it as is. Restore the functionality for inactive snapshots by disabling the check. In the future when uefi snapshotting will be added the rest of the condition will also be removed. Resolves: https://gitlab.com/libvirt/libvirt/-/issues/460 Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_snapshot.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c index 12ddf19c48..91de8b0c31 100644 --- a/src/qemu/qemu_snapshot.c +++ b/src/qemu/qemu_snapshot.c @@ -749,11 +749,17 @@ qemuSnapshotPrepare(virDomainObj *vm, * - if the variable store is raw, the snapshot fails * - allowing a qcow2 image as the varstore would make it eligible to = receive * the vmstate dump, which would make it huge - * - offline snapshot would not snapshot the varstore at all * - * Avoid the issues by forbidding internal snapshot with pflash comple= tely. + * While offline snapshot would not snapshot the varstore at all, this= used + * to work as auto-detected UEFI firmware was not present in the offli= ne + * definition. Since in most cases the varstore doesn't change it's us= ually + * not an issue. Allow this as there are existing users of this case. + * + * Avoid the issues by forbidding internal snapshot with pflash if the + * VM is active. */ - if (found_internal && + if (active && + found_internal && virDomainDefHasOldStyleUEFI(vm->def)) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s", _("internal snapshots of a VM with pflash based " --=20 2.39.2