all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH guest-common/manager/qemu-server v7 0/3] fix #5032: add guest time sync via QGA
@ 2026-11-17 12:39 Jakob Klocker
  2026-11-17 12:39 ` [PATCH pve-guest-common v7 1/3] AbstractConfig: allow passing options to snapshot_rollback Jakob Klocker
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Jakob Klocker @ 2026-11-17 12:39 UTC (permalink / raw)
  To: pve-devel

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. Skew also appears whenever the guest is briefly
frozen and resumed - after creating a snapshot, an
ordinary pause/resume, the resume step of a live migration, or a
vzdump in suspend mode.

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
 * after a vzdump backup in suspend mode

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 option can also be toggled per VM in the GUI.

Changes since v6 (thanks @Fiona):
 * rebased on current master
 * rollback with RAM: check whether the agent is enabled against the
   restored config, only carry over the pre-rollback sync preference
 * api: clarify that the start parameter only applies to hibernated VMs,
   fix the resume endpoint descriptions, drop redundant sentence from
   the short descriptions, rewrap verbose descriptions to 100 columns
 * ui: reword the checkbox label to list the triggering operations
 * migration: use a regular if block for the sync log message and
   clarify that it only reports the request
 * vm_resume: check the 'prelaunch' and 'shutdown' states explicitly
 * vm_start_nolock: drop stray '1' in eval
 * guest-common: rename $opts to $vm_start_opts
 * POD fixes, sort imports

Changes since v5:
 * drop the migration version check (covered by the strict config check
   series and the same-version cluster requirement)
 * vzdump: sync the guest clock after resuming from a suspend mode backup;
   snapshot mode doesn't pause the vCPUs and stop mode boots the guest
   fresh, so neither needs a sync
 * vm_resume: skip the sync when resuming from 'prelaunch' (e.g. a VM
   started paused for a backup) or after a reset, the guest boots fresh in
   both cases
 * guest_set_time: return whether the time was actually set
 * rebased on current master

Changes since v4:
 * rebased on current master
 * no functional changes

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


pve-guest-common:

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

 src/PVE/AbstractConfig.pm | 6 ++++--
 1 file changed, 4 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, 18 insertions(+)


qemu-server:

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

 src/PVE/API2/Qemu.pm           | 74 ++++++++++++++++++++++++++++++++--
 src/PVE/CLI/qm.pm              |  2 +-
 src/PVE/QemuConfig.pm          | 14 ++++++-
 src/PVE/QemuMigrate.pm         |  6 +++
 src/PVE/QemuServer.pm          | 17 +++++++-
 src/PVE/QemuServer/Agent.pm    | 63 +++++++++++++++++++++++++++++
 src/PVE/QemuServer/RunState.pm | 16 +++++++-
 src/PVE/VZDump/QemuServer.pm   | 25 +++++++++++-
 8 files changed, 207 insertions(+), 10 deletions(-)


Summary over all repositories:
  10 files changed, 229 insertions(+), 12 deletions(-)

-- 
Generated by murpp 0.12.0




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

end of thread, other threads:[~2026-11-19  8:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-17 12:39 [PATCH guest-common/manager/qemu-server v7 0/3] fix #5032: add guest time sync via QGA Jakob Klocker
2026-11-17 12:39 ` [PATCH pve-guest-common v7 1/3] AbstractConfig: allow passing options to snapshot_rollback Jakob Klocker
2026-11-17 12:39 ` [PATCH pve-manager v7 2/3] fix #5032: ui: qemu agent: add sync-time-on-resume option Jakob Klocker
2026-11-17 12:39 ` [PATCH qemu-server v7 3/3] fix #5032: agent: sync guest time via QGA when the clock falls behind Jakob Klocker
2026-11-18 14:22 ` applied: [PATCH guest-common/manager/qemu-server v7 0/3] fix #5032: add guest time sync via QGA Thomas Lamprecht
2026-11-19  6:36   ` Jakob Klocker
2026-11-19  8:52     ` Thomas Lamprecht

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal