Signed-off-by: Stefan Hanreich <s.hanre...@proxmox.com> --- The example script currently enumerates the different phases (first, second, ...). I have opted to not continue this enumeration as I couldn't see any particular reason for this and I will add lots of new phases in subsequent patch series. Am I missing a particular reason for the numbering? I think it might be smart to create another patch after merging all the different hook patches, that cleans up the comments/ordering in the example script and removes the enumerations.
examples/guest-example-hookscript.pl | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/examples/guest-example-hookscript.pl b/examples/guest-example-hookscript.pl index adeed59..e4f032b 100755 --- a/examples/guest-example-hookscript.pl +++ b/examples/guest-example-hookscript.pl @@ -54,6 +54,20 @@ if ($phase eq 'pre-start') { print "$vmid stopped. Doing cleanup.\n"; +} elsif ($phase eq 'pre-snapshot') { + + # Phase 'pre-snapshot' will be executed before taking a snapshot of + # the guest (via UI or CLI) + + print "$vmid will be snapshotted.\n"; + +} elsif ($phase eq 'post-snapshot') { + + # Phase 'post-snapshot' will be executed after taking a snapshot of + # the guest (via UI or CLI) + + print "$vmid has been successfully snapshotted.\n"; + } else { die "got unknown phase '$phase'\n"; } -- 2.30.2 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel