X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=PVE%2FAPI2%2FQemu.pm;h=8411293290e7aaba2daf7e792938ab06469d46cc;hb=75e7e997e7a12769d9a653cda39b64101a492bca;hp=3cc35a223d34f626dae0aeb9b89eb7151ca8b5d3;hpb=0402a80b77aa25befe86b36d4b50bc781f3eefb8;p=qemu-server.git diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index 3cc35a2..8411293 100644 --- a/PVE/API2/Qemu.pm +++ b/PVE/API2/Qemu.pm @@ -2401,9 +2401,11 @@ __PACKAGE__->register_method({ my $realcmd = sub { PVE::QemuServer::template_create($vmid, $conf, $disk); }; - return $rpcenv->fork_worker('qmtemplate', $vmid, $authuser, $realcmd); + $conf->{template} = 1; PVE::QemuServer::update_config_nolock($vmid, $conf, 1); + + return $rpcenv->fork_worker('qmtemplate', $vmid, $authuser, $realcmd); }; PVE::QemuServer::lock_config($vmid, $updatefn);