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-guest-common v3 1/3] AbstractConfig: allow passing options to snapshot_rollback
Date: Thu,  2 Jul 2026 12:31:59 +0200	[thread overview]
Message-ID: <20260702103201.164567-2-j.klocker@proxmox.com> (raw)
In-Reply-To: <20260702103201.164567-1-j.klocker@proxmox.com>

Thread an optional $opts hashref through snapshot_rollback to
__snapshot_rollback_vm_start, so callers can pass per-rollback options
down to the VM start. Used by qemu-server to let the API override the
guest time sync for a single rollback; other options can be added
without further signature changes.

Signed-off-by: Jakob Klocker <j.klocker@proxmox.com>
---
 src/PVE/AbstractConfig.pm | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/PVE/AbstractConfig.pm b/src/PVE/AbstractConfig.pm
index 7bcae19..76ea97a 100644
--- a/src/PVE/AbstractConfig.pm
+++ b/src/PVE/AbstractConfig.pm
@@ -1125,7 +1125,8 @@ my $rollback_remove_replication_snapshots = sub {
 
 # Rolls back to a given snapshot.
 sub snapshot_rollback {
-    my ($class, $vmid, $snapname) = @_;
+    my ($class, $vmid, $snapname, $opts) = @_;
+    $opts //= {};
 
     my $prepare = 1;
 
@@ -1197,7 +1198,7 @@ sub snapshot_rollback {
         $class->write_config($vmid, $conf);
 
         if (!$prepare && $snap->{vmstate}) {
-            $class->__snapshot_rollback_vm_start($vmid, $snap->{vmstate}, $data);
+            $class->__snapshot_rollback_vm_start($vmid, $snap->{vmstate}, $data, $opts);
         }
     };
 
-- 
2.47.3




  reply	other threads:[~2026-07-02 10:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Jakob Klocker [this message]
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-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

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=20260702103201.164567-2-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