From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id C0BFF1FF14C for ; Fri, 12 Jun 2026 14:29:53 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 23EB8126F0; Fri, 12 Jun 2026 14:29:53 +0200 (CEST) From: Jakob Klocker To: pve-devel@lists.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 Message-ID: <20260612122942.181958-3-j.klocker@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260612122942.181958-1-j.klocker@proxmox.com> References: <20260612122942.181958-1-j.klocker@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.033 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 KAM_LAZY_DOMAIN_SECURITY 1 Sending domain does not have any anti-forgery methods RDNS_NONE 0.793 Delivered to internal network by a host with no rDNS SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_NONE 0.001 SPF: sender does not publish an SPF Record Message-ID-Hash: 2TFLEQM2CKBAX7HF7LFL6K4HSMYKUGF6 X-Message-ID-Hash: 2TFLEQM2CKBAX7HF7LFL6K4HSMYKUGF6 X-MailFrom: root@dev.proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Jakob Klocker X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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 --- 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