From: Demayl <denis.kanchev@storpool.com>
To: pve-devel@lists.proxmox.com
Subject: [Add group snapshots 4/4] ui: add atomic snapshot type when creating a snapshot
Date: Tue, 1 Dec 2026 16:19:09 +0200 [thread overview]
Message-ID: <20261201141918.35872-5-denis.kanchev@storpool.com> (raw)
In-Reply-To: <20261201141918.35872-1-denis.kanchev@storpool.com>
Now we have two types of snapshots:
1. Sequential - default every volume separately
2. Atomic - group snapshot of all volumes
The storage must support this feature for every volume
or the feature remains hidden
Signed-off-by: Demayl <denis.kanchev@storpool.com>
---
www/manager6/window/Snapshot.js | 43 +++++++++++++++++++++++++++++++++
1 file changed, 43 insertions(+)
diff --git a/www/manager6/window/Snapshot.js b/www/manager6/window/Snapshot.js
index a2134bd3..ea35d072 100644
--- a/www/manager6/window/Snapshot.js
+++ b/www/manager6/window/Snapshot.js
@@ -7,12 +7,15 @@ Ext.define('PVE.window.Snapshot', {
isCreate: undefined,
running: false,
guestAgentEnabled: false,
+ atomic: false,
},
formulas: {
runningWithoutGuestAgent: (get) =>
get('type') === 'qemu' && get('running') && !get('guestAgentEnabled'),
shouldWarnAboutFS: (get) =>
get('isCreate') && get('runningWithoutGuestAgent') && get('!vmstate.checked'),
+ atomicEnabled: (get) =>
+ get('atomic')
},
},
@@ -57,6 +60,16 @@ Ext.define('PVE.window.Snapshot', {
vm.set('guestAgentEnabled', !!PVE.Parser.parseBoolean(enabled.enabled));
},
});
+ Proxmox.Utils.API2Request({
+ url: `/nodes/${me.nodename}/${me.type}/${me.vmid}/feature`,
+ params: { feature: 'atomic_snapshot' },
+ async: false,
+ method: 'GET',
+ success: function(response, options) {
+ let res = response.result.data;
+ vm.set('atomic', !!res.hasFeature);
+ },
+ });
}
me.items = [
@@ -87,6 +100,36 @@ Ext.define('PVE.window.Snapshot', {
checked: 1,
fieldLabel: gettext('Include RAM'),
},
+ {
+ xtype: 'radiogroup',
+ fieldLabel: gettext('Type'),
+ vertical: true,
+ hidden: !me.isCreate || !vm.get('atomic'),
+ columns: 1,
+ reference: 'atomic',
+ items: [
+ {
+ xtype: 'radiofield',
+ boxLabel: gettext('Sequential'),
+ name: 'type',
+ flex: 1,
+ inputValue: 'sequential',
+ bind: { value: 'sequential' }
+ },
+ {
+ xtype: 'radiofield',
+ boxLabel: gettext('Atomic'),
+ name: 'type',
+ flex: 1,
+ inputValue: 'atomic',
+ disabled: true,
+ bind: {
+ value: '',
+ disabled: '{!atomic}',
+ }
+ }
+ ]
+ },
{
xtype: 'textareafield',
grow: true,
--
2.53.0
next prev parent reply other threads:[~2026-12-01 14:19 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 ` [Add group snapshots 3/4] snapshot: add atomic_snapshot Demayl
2026-12-01 14:19 ` Demayl [this message]
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-5-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox