Signed-off-by: Oguz Bektas <o.bek...@proxmox.com> --- v4->v5: * no change
src/PVE/API2/LXC.pm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/PVE/API2/LXC.pm b/src/PVE/API2/LXC.pm index ade109b..c2312f4 100644 --- a/src/PVE/API2/LXC.pm +++ b/src/PVE/API2/LXC.pm @@ -1554,6 +1554,15 @@ __PACKAGE__->register_method({ } PVE::AccessControl::add_vm_to_pool($newid, $pool) if $pool; + + $newconf = PVE::LXC::Config->load_config($newid); + die "Lost 'create' config lock, aborting.\n" + if !PVE::LXC::Config->has_lock($newconf, 'create'); + my $rootdir = PVE::LXC::mount_all($newid, $storecfg, $newconf, 1); + my $lxc_setup = PVE::LXC::Setup->new($newconf, $rootdir); + $lxc_setup->post_clone_hook($newconf); + PVE::LXC::umount_all($newid, $storecfg, $newconf, 1); + PVE::LXC::Config->remove_lock($newid, 'create'); PVE::LXC::Config->lock_config($newid, sub { -- 2.20.1 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel