[pve-devel] [PATCH pve-container 1/1] Add CT hooks for pre/post-clone

Stefan Hanreich s.hanreich at proxmox.com
Fri Sep 23 11:55:27 CEST 2022


Signed-off-by: Stefan Hanreich <s.hanreich at proxmox.com>
---
 src/PVE/API2/LXC.pm | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/PVE/API2/LXC.pm b/src/PVE/API2/LXC.pm
index 589f96f..d6ebc08 100644
--- a/src/PVE/API2/LXC.pm
+++ b/src/PVE/API2/LXC.pm
@@ -1609,6 +1609,8 @@ __PACKAGE__->register_method({
 		    local $SIG{QUIT} =
 		    local $SIG{HUP} = sub { die "interrupted by signal\n"; };
 
+		PVE::GuestHelpers::exec_hookscript($newconf, $newid, "pre-clone", 1);
+
 		PVE::Storage::activate_volumes($storecfg, $vollist, $snapname);
 		my $bwlimit = extract_param($param, 'bwlimit');
 
@@ -1690,6 +1692,8 @@ __PACKAGE__->register_method({
 		}
 	    });
 
+	    PVE::GuestHelpers::exec_hookscript($newconf, $newid, "post-clone");
+
 	    return;
 	};
 
-- 
2.30.2





More information about the pve-devel mailing list