From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 10F781FF2C5 for ; Mon, 8 Jul 2024 15:55:12 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 8F2137310; Mon, 8 Jul 2024 15:55:24 +0200 (CEST) From: Markus Frank To: pve-devel@lists.proxmox.com Date: Mon, 8 Jul 2024 15:55:06 +0200 Message-Id: <20240708135511.1083400-8-m.frank@proxmox.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240708135511.1083400-1-m.frank@proxmox.com> References: <20240708135511.1083400-1-m.frank@proxmox.com> MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.025 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pve-devel] [PATCH qemu-server v11 7/12] disable snapshot (with RAM) and hibernate with virtio-fs devices X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" Signed-off-by: Markus Frank --- PVE/API2/Qemu.pm | 6 ++++++ PVE/QemuServer.pm | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index f4982b0..854ad98 100644 --- a/PVE/API2/Qemu.pm +++ b/PVE/API2/Qemu.pm @@ -5246,6 +5246,12 @@ __PACKAGE__->register_method({ my $snapname = extract_param($param, 'snapname'); + # TODO: move to check_non_migratable_resources when applied (SEV patch series) + my $vmconf = PVE::QemuConfig->load_config($vmid); + my $vmstate = extract_param($param, 'vmstate'); + die "Cannot snapshot with including state while virtiofs is in use.\n" + if $vmstate && PVE::QemuServer::Virtiofs::virtiofs_enabled($vmconf); + die "unable to use snapshot name 'current' (reserved name)\n" if $snapname eq 'current'; diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 026fb66..d48d0a6 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -6393,6 +6393,10 @@ sub vm_suspend { $conf = PVE::QemuConfig->load_config($vmid); + # TODO: move to check_non_migratable_resources when applied (SEV patch series) + die "Cannot hibernate while virtiofs is in use.\n" + if $includestate && PVE::QemuServer::Virtiofs::virtiofs_enabled($conf); + my $is_backing_up = PVE::QemuConfig->has_lock($conf, 'backup'); PVE::QemuConfig->check_lock($conf) if !($skiplock || $is_backing_up); -- 2.39.2 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel