Signed-off-by: Alexandre Derumier <aderum...@odiso.com> --- PVE/QemuServer.pm | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-)
diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index e72b2c9..7c20f55 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -4476,24 +4476,7 @@ sub template_create { sub is_template { my ($conf) = @_; - my $baseimagecount = 0; - my $totalvolumecount = 0; - my $storecfg = PVE::Storage::config(); - - foreach_drive($conf, sub { - my ($ds, $drive) = @_; - return if drive_is_cdrom($drive); - $totalvolumecount++; - my $volid = $drive->{file}; - if (PVE::Storage::volume_is_base($storecfg, $volid)){ - $baseimagecount++; - } - - }); - - return 0 if $baseimagecount == 0; - return 1 if $baseimagecount == $totalvolumecount; #full template - return 2 if $baseimagecount < $totalvolumecount; #semi-template + return 1 if defined $conf->{template} && $conf->{template} == 1; } 1; -- 1.7.10.4 _______________________________________________ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel