public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Jakob Klocker <j.klocker@proxmox.com>
To: pve-devel@lists.proxmox.com
Cc: Jakob Klocker <j.klocker@proxmox.com>
Subject: [PATCH pve-manager 2/2] fix #5032: ui: qemu agent: add set-time-on-resume option
Date: Fri, 12 Jun 2026 14:29:42 +0200	[thread overview]
Message-ID: <20260612122942.181958-3-j.klocker@proxmox.com> (raw)
In-Reply-To: <20260612122942.181958-1-j.klocker@proxmox.com>

Expose the new agent configuration option `set-time-on-resume`
in the VM configuration GUI.

This allows enabling/disabling automatic guest clock
synchronization after resume from saved state or snapshot
restore with RAM.

Link: https://bugzilla.proxmox.com/show_bug.cgi?id=5032
Signed-off-by: Jakob Klocker <j.klocker@proxmox.com>
---
 www/manager6/Utils.js                     |  2 ++
 www/manager6/form/AgentFeatureSelector.js | 18 ++++++++++++++++++
 2 files changed, 20 insertions(+)

diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js
index 2ed4e65d..ee55a6ac 100644
--- a/www/manager6/Utils.js
+++ b/www/manager6/Utils.js
@@ -523,6 +523,8 @@ Ext.define('PVE.Utils', {
                     continue;
                 } else if (key === 'freeze-fs' && PVE.Parser.parseBoolean(value)) {
                     continue;
+                } else if (key === 'set-time-on-resume' && PVE.Parser.parseBoolean(value)) {
+                    continue;
                 } else if (PVE.Parser.parseBoolean(value)) {
                     displayText = Proxmox.Utils.enabledText;
                 }
diff --git a/www/manager6/form/AgentFeatureSelector.js b/www/manager6/form/AgentFeatureSelector.js
index 3cae4194..ba21a383 100644
--- a/www/manager6/form/AgentFeatureSelector.js
+++ b/www/manager6/form/AgentFeatureSelector.js
@@ -45,6 +45,18 @@ Ext.define('PVE.form.AgentFeatureSelector', {
                 hidden: '{freeze_fs.checked}',
             },
         },
+        {
+            xtype: 'proxmoxcheckbox',
+            boxLabel: gettext('Set guest clock to host after resume from saved state'),
+            name: 'set-time-on-resume',
+            reference: 'set_time_on_resume',
+            bind: {
+                disabled: '{!enabled.checked}',
+            },
+            disabled: true,
+            uncheckedValue: '0',
+            defaultValue: '1',
+        },
         {
             xtype: 'displayfield',
             userCls: 'pmx-hint',
@@ -74,6 +86,9 @@ Ext.define('PVE.form.AgentFeatureSelector', {
         if (PVE.Parser.parseBoolean(values['freeze-fs'])) {
             delete values['freeze-fs'];
         }
+        if (PVE.Parser.parseBoolean(values['set-time-on-resume'])) {
+            delete values['set-time-on-resume'];
+        }
 
         const agentstr = PVE.Parser.printPropertyString(values, 'enabled');
         return { agent: agentstr };
@@ -90,6 +105,9 @@ Ext.define('PVE.form.AgentFeatureSelector', {
         if (!Ext.isDefined(res['freeze-fs'])) {
             res['freeze-fs'] = 1;
         }
+        if (!Ext.isDefined(res['set-time-on-resume'])) {
+            res['set-time-on-resume'] = 1;
+        }
 
         this.callParent([res]);
     },
-- 
2.47.3




      parent reply	other threads:[~2026-06-12 12:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-12 12:29 [PATCH manager/qemu-server 0/2] fix #5032: sync guest time after restore from saved state Jakob Klocker
2026-06-12 12:29 ` [PATCH qemu-server 1/2] fix #5032: qemu: sync guest time on resume and snapshot of " Jakob Klocker
2026-06-12 12:29 ` Jakob Klocker [this message]

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=20260612122942.181958-3-j.klocker@proxmox.com \
    --to=j.klocker@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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal