From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 331331FF153 for ; Mon, 22 Jun 2026 15:47:32 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 63D5DD164; Mon, 22 Jun 2026 15:47:24 +0200 (CEST) From: Jakob Klocker To: pve-devel@lists.proxmox.com Subject: [PATCH pve-manager v2 2/2] fix #5032: ui: qemu agent: add set-time-on-resume option Date: Mon, 22 Jun 2026 15:47:11 +0200 Message-ID: <20260622134711.108611-3-j.klocker@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260622134711.108611-1-j.klocker@proxmox.com> References: <20260622134711.108611-1-j.klocker@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.140 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: 6XBDPX7K235F7VUWGX52JPYPG2TNLX47 X-Message-ID-Hash: 6XBDPX7K235F7VUWGX52JPYPG2TNLX47 X-MailFrom: jklocker@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 Reviewed-by: Arthur Bied-Charreton Tested-by: Arthur Bied-Charreton --- changes since v1: - reword the agent option label for clarity www/manager6/Utils.js | 2 ++ www/manager6/form/AgentFeatureSelector.js | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js index bbf59d8f..20862875 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..a7cec6c2 100644 --- a/www/manager6/form/AgentFeatureSelector.js +++ b/www/manager6/form/AgentFeatureSelector.js @@ -45,6 +45,20 @@ Ext.define('PVE.form.AgentFeatureSelector', { hidden: '{freeze_fs.checked}', }, }, + { + xtype: 'proxmoxcheckbox', + boxLabel: gettext( + "Synchronize guest clock with the host's 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 +88,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 +107,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