forbid restore into existing template

This commit is contained in:
Fabian Grünbichler 2016-09-15 13:23:12 +02:00 committed by Dietmar Maurer
parent 7147c8977a
commit 3a07a8a9ff

View 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";
}