die "you can't convert a template to a template\n"
if PVE::QemuServer::is_template($conf) && !$disk;
+ die "you can't convert a VM to template if VM is running\n"
+ if check_running($vmid);
+
my $realcmd = sub {
PVE::QemuServer::template_create($vmid, $conf, $disk);
};