From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 58BBF1FF16F for ; Fri, 15 Nov 2024 15:02:08 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id DAC15159FE; Fri, 15 Nov 2024 15:01:34 +0100 (CET) From: Markus Frank To: pve-devel@lists.proxmox.com Date: Fri, 15 Nov 2024 15:00:32 +0100 Message-Id: <20241115140037.191682-8-m.frank@proxmox.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241115140037.191682-1-m.frank@proxmox.com> References: <20241115140037.191682-1-m.frank@proxmox.com> MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.023 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 v12 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 a369a32b..90ed8f81 100644 --- a/PVE/API2/Qemu.pm +++ b/PVE/API2/Qemu.pm @@ -5252,6 +5252,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 20d38fe0..e198df83 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -6453,6 +6453,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.5 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel