[pve-devel] [PATCH qemu-server] forbid restore into existing template
Fabian Grünbichler
f.gruenbichler at proxmox.com
Thu Sep 15 13:23:12 CEST 2016
---
PVE/API2/Qemu.pm | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
index 60d653f..482b8cd 100644
--- a/PVE/API2/Qemu.pm
+++ b/PVE/API2/Qemu.pm
@@ -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";
}
--
2.1.4
More information about the pve-devel
mailing list