From: Markus Frank <m.frank@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH guest-common v12 1/6] AbstractConfig: add abstract method to check for resources preventing a snapshot
Date: Mon, 11 Nov 2024 14:57:08 +0100 [thread overview]
Message-ID: <20241111135713.212601-2-m.frank@proxmox.com> (raw)
In-Reply-To: <20241111135713.212601-1-m.frank@proxmox.com>
Signed-off-by: Markus Frank <m.frank@proxmox.com>
Suggested-by: Fiona Ebner <f.ebner@proxmox.com>
---
This patch is new in v12.
src/PVE/AbstractConfig.pm | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/PVE/AbstractConfig.pm b/src/PVE/AbstractConfig.pm
index 5d5f9b4..3d4fcbb 100644
--- a/src/PVE/AbstractConfig.pm
+++ b/src/PVE/AbstractConfig.pm
@@ -579,6 +579,13 @@ sub __snapshot_check_running {
die "implement me - abstract method\n";
}
+# Abstract method: Check if there is a resource preventing a snapshot.
+sub __snapshot_assert_no_blockers {
+ my ($class, $vmconf, $save_vmstate) = @_;
+
+ return;
+}
+
# Check whether we need to freeze the VM/CT
sub __snapshot_check_freeze_needed {
my ($sself, $vmid, $config, $save_vmstate) = @_;
@@ -726,6 +733,8 @@ sub __snapshot_prepare {
$class->check_lock($conf);
+ $class->__snapshot_assert_no_blockers($conf, $save_vmstate);
+
$conf->{lock} = 'snapshot';
my $snapshots = $conf->{snapshots};
--
2.39.5
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next prev parent reply other threads:[~2024-11-11 13:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-11 13:57 [pve-devel] [PATCH guest-common/qemu-server/docs/manager v12 0/6] AMD SEV Markus Frank
2024-11-11 13:57 ` Markus Frank [this message]
2024-11-11 13:57 ` [pve-devel] [PATCH qemu-server v12 2/6] add C program to get hardware capabilities from CPUID Markus Frank
2024-11-11 13:57 ` [pve-devel] [PATCH qemu-server v12 3/6] config: add AMD SEV support Markus Frank
2024-11-11 13:57 ` [pve-devel] [PATCH qemu-server v12 4/6] migration: add check_non_migratable_resources function Markus Frank
2024-11-11 13:57 ` [pve-devel] [PATCH docs v12 5/6] add AMD SEV documentation Markus Frank
2024-11-11 13:57 ` [pve-devel] [PATCH manager v12 6/6] ui: add AMD SEV configuration to Options Markus Frank
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241111135713.212601-2-m.frank@proxmox.com \
--to=m.frank@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox