--- Qemu.pm 2020-01-09 23:15:58.500566385 +0100
+++ Qemu.pm.patch 2020-01-10 07:00:16.794454214 +0100
@@ -2941,6 +2941,9 @@
PVE::QemuConfig->write_config($newid, $newconf);
+ my $conf = PVE::QemuConfig->load_config($newid);
+ PVE::GuestHelpers::exec_hookscript($conf, $newid, 'post-clone');
+
if ($target) {
# always deactivate volumes - avoid lvm LVs to be active on several nodes
PVE::Storage::deactivate_volumes($storecfg, $vollist, $snapname) if !$running;
@@ -4051,6 +4054,8 @@
$conf->{template} = 1;
PVE::QemuConfig->write_config($vmid, $conf);
+ PVE::GuestHelpers::exec_hookscript($conf, $vmid, 'post-template');
+
return $rpcenv->fork_worker('qmtemplate', $vmid, $authuser, $realcmd);
};