public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH guest-common/manager/qemu-server v3 0/3] fix #5032: add guest time sync via QGA
@ 2026-07-02 10:31 Jakob Klocker
  2026-07-02 10:31 ` [PATCH pve-guest-common v3 1/3] AbstractConfig: allow passing options to snapshot_rollback Jakob Klocker
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Jakob Klocker @ 2026-07-02 10:31 UTC (permalink / raw)
  To: pve-devel; +Cc: Jakob Klocker

This series adds a new agent option 'sync-time-on-resume' to
automatically synchronize the guest clock via the QEMU Guest Agent 
after operations that can leave the guest time stale. The option is 
disabled by default and only takes effect when the QEMU Guest Agent is
enabled.

When a VM resumes with a restored RAM state (waking from hibernation or
rolling back to a snapshot that includes RAM), the guest clock 
continues from the point the state was saved and no longer matches 
wall-clock time. Skews also appears whenever the guest is briefly 
frozen and resumed - after creating a snapshot, an
ordinary pause/resume, or the resume step of a live migration. 

When enabled, the option triggers a guest-set-time call:
 * after resuming from hibernation (suspend-to-disk)
 * after rolling back to a snapshot that includes RAM
 * after a live migration
 * after an ordinary pause/resume
 * after taking a snapshot

The start, resume and rollback API endpoints also accept a
'sync-time-on-resume' parameter that overrides the configured value for
a single operation. 

The persistent config option is exposed in the QEMU Guest Agent
configuration GUI, so it can be toggled per guest.

Link: https://bugzilla.proxmox.com/show_bug.cgi?id=5032

changes from v1 to v2 (thanks @Arthur)
- qemu: adapt warning message in the resume-from-saved-state path
- ui: reword the agent option label for clarity

changes from v2 to v3 (thanks @Fiona)
- add sync on pause/resume
- add override options
- add print task 
- adapt formating and naming

pve-guest-common:

Jakob Klocker (1):
  AbstractConfig: allow passing options to snapshot_rollback

 src/PVE/AbstractConfig.pm | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)


pve-manager:

Jakob Klocker (1):
  fix #5032: ui: qemu agent: add sync-time-on-resume option

 www/manager6/form/AgentFeatureSelector.js | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)


qemu-server:

Jakob Klocker (1):
  fix #5032: agent: sync guest time via QGA when the clock falls behind

 src/PVE/API2/Qemu.pm           | 46 ++++++++++++++++++++++++++---
 src/PVE/CLI/qm.pm              |  2 +-
 src/PVE/QemuConfig.pm          | 12 ++++++--
 src/PVE/QemuMigrate.pm         |  2 ++
 src/PVE/QemuServer.pm          | 18 +++++++++++-
 src/PVE/QemuServer/Agent.pm    | 54 ++++++++++++++++++++++++++++++++++
 src/PVE/QemuServer/RunState.pm | 11 ++++++-
 7 files changed, 136 insertions(+), 9 deletions(-)


Summary over all repositories:
  9 files changed, 156 insertions(+), 12 deletions(-)

-- 
Generated by murpp 0.12.0



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2026-07-03  7:37 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-02 10:31 [PATCH guest-common/manager/qemu-server v3 0/3] fix #5032: add guest time sync via QGA Jakob Klocker
2026-07-02 10:31 ` [PATCH pve-guest-common v3 1/3] AbstractConfig: allow passing options to snapshot_rollback Jakob Klocker
2026-07-02 10:32 ` [PATCH pve-manager v3 2/3] fix #5032: ui: qemu agent: add sync-time-on-resume option Jakob Klocker
2026-07-02 11:00   ` Maximiliano Sandoval
2026-07-02 10:32 ` [PATCH qemu-server v3 3/3] fix #5032: agent: sync guest time via QGA when the clock falls behind Jakob Klocker
2026-07-02 10:56   ` Maximiliano Sandoval
2026-07-03  7:04     ` Jakob Klocker
2026-07-03  7:37     ` Jakob Klocker
2026-07-02 15:14 ` [PATCH guest-common/manager/qemu-server v3 0/3] fix #5032: add guest time sync via QGA Maximiliano Sandoval
2026-07-03  6:33   ` Jakob Klocker

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