[pve-devel] [PATCH 08/14] forbid configuration update of a template
Alexandre Derumier
aderumier at odiso.com
Thu Jan 10 14:16:16 CET 2013
Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
PVE/API2/Qemu.pm | 2 ++
1 file changed, 2 insertions(+)
diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
index 91cf569..63dbd33 100644
--- a/PVE/API2/Qemu.pm
+++ b/PVE/API2/Qemu.pm
@@ -873,6 +873,8 @@ __PACKAGE__->register_method({
die "checksum missmatch (file change by other user?)\n"
if $digest && $digest ne $conf->{digest};
+ die "You can't change the configuration of a template" if $conf->{template};
+
PVE::QemuServer::check_lock($conf) if !$skiplock;
if ($param->{memory} || defined($param->{balloon})) {
--
1.7.10.4
More information about the pve-devel
mailing list