Signed-off-by: Stefan Hanreich <s.hanre...@proxmox.com> --- src/PVE/API2/LXC.pm | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/src/PVE/API2/LXC.pm b/src/PVE/API2/LXC.pm index 79aecaa..0e8cb95 100644 --- a/src/PVE/API2/LXC.pm +++ b/src/PVE/API2/LXC.pm @@ -380,6 +380,9 @@ __PACKAGE__->register_method({ my $orig_mp_param; # only used if $restore if ($restore) { die "can't overwrite running container\n" if PVE::LXC::check_running($vmid); + + PVE::GuestHelpers::exec_hookscript($old_conf, $vmid, 'pre-restore', 1); + if ($archive ne '-') { my $orig_conf; print "recovering backed-up configuration from '$archive'\n"; @@ -505,6 +508,10 @@ __PACKAGE__->register_method({ PVE::API2::LXC::Status->vm_start({ vmid => $vmid, node => $node }) if $start_after_create; + + if ($restore) { + PVE::GuestHelpers::exec_hookscript($conf, $vmid, 'post-restore'); + } }; my $workername = $restore ? 'vzrestore' : 'vzcreate'; -- 2.30.2 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel