]> git.proxmox.com Git - qemu-server.git/commitdiff
forbid restore into existing template
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Thu, 15 Sep 2016 11:23:12 +0000 (13:23 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 15 Sep 2016 12:14:46 +0000 (14:14 +0200)
PVE/API2/Qemu.pm

index 60d653f91d8846fcf129a0af87ad4e0d4f642937..482b8cd23509b5f692d243f2714d34b718af624a 100644 (file)
@@ -490,6 +490,10 @@ __PACKAGE__->register_method({
 
                    die "unable to restore vm $vmid - vm is running\n"
                        if PVE::QemuServer::check_running($vmid);
+
+                   die "unable to restore vm $vmid - vm is a template\n"
+                       if PVE::QemuConfig->is_template($conf);
+
                } else {
                    die "unable to restore vm $vmid - already existing on cluster node '$current_node'\n";
                }