all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Demayl <denis.kanchev@storpool.com>
To: pve-devel@lists.proxmox.com
Subject: [Add group snapshots 3/4] snapshot: add atomic_snapshot
Date: Tue,  1 Dec 2026 16:19:08 +0200	[thread overview]
Message-ID: <20261201141918.35872-4-denis.kanchev@storpool.com> (raw)
In-Reply-To: <20261201141918.35872-1-denis.kanchev@storpool.com>

Adds the vm feature check for atomic_snapshot
It must be supported by a storage plugin
Adds the type option when creating a snapshot
to support atomic snapshots. For now it supports atomic as value
Defaults to sequential if not used.

Signed-off-by: Demayl <denis.kanchev@storpool.com>
---
 src/PVE/API2/Qemu.pm  | 7 ++++++-
 src/PVE/QemuServer.pm | 5 +++++
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/src/PVE/API2/Qemu.pm b/src/PVE/API2/Qemu.pm
index 2119e69e..8e9df22c 100644
--- a/src/PVE/API2/Qemu.pm
+++ b/src/PVE/API2/Qemu.pm
@@ -4542,7 +4542,7 @@ __PACKAGE__->register_method({
             feature => {
                 description => "Feature to check.",
                 type => 'string',
-                enum => ['snapshot', 'clone', 'copy'],
+                enum => ['snapshot', 'clone', 'copy', 'atomic_snapshot'],
             },
             snapname => get_standard_option('pve-snapshot-name', {
                     optional => 1,
@@ -6482,6 +6482,11 @@ __PACKAGE__->register_method({
                 type => 'string',
                 description => "A textual description or comment.",
             },
+            type => {
+                optional => 1,
+                type => 'string',
+                description => "Sequential or atomic snapshot of VM volumes (if supported by storage)"
+            }
         },
     },
     returns => {
diff --git a/src/PVE/QemuServer.pm b/src/PVE/QemuServer.pm
index 1d665877..bdade7f5 100644
--- a/src/PVE/QemuServer.pm
+++ b/src/PVE/QemuServer.pm
@@ -2510,6 +2510,11 @@ our $vmstatus_return_properties = {
         type => 'number',
         optional => 1,
     },
+    atomic_snapshots => {
+        description => "Determines if the storage allows atomic snapshots",
+        type => 'boolean',
+        optional => 1,
+    }
 };
 
 my $last_proc_pid_stat;
-- 
2.53.0




  parent reply	other threads:[~2026-12-01 14:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-01 14:19 [Add group snapshots 0/4] Adds support for atomic snapshots Demayl
2026-12-01 14:19 ` [Add group snapshots 1/4] plugin: add volumes_atomic_snapshot Demayl
2026-12-01 14:19 ` [Add group snapshots 2/4] snapshot: add atomic snapshots Demayl
2026-12-01 14:19 ` Demayl [this message]
2026-12-01 14:19 ` [Add group snapshots 4/4] ui: add atomic snapshot type when creating a snapshot Demayl
2026-12-01 16:19 ` [Add group snapshots 0/4] Adds support for atomic snapshots DERUMIER, Alexandre

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=20261201141918.35872-4-denis.kanchev@storpool.com \
    --to=denis.kanchev@storpool.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal