PVE::QemuServer::check_lock($conf);
- die "you can't convert a template to a template"
+ die "unable to create template, because VM contains snapshots\n"
+ if $conf->{snapshots};
+
+ die "you can't convert a template to a template\n"
if PVE::QemuServer::is_template($conf) && !$disk;
+
my $realcmd = sub {
PVE::QemuServer::template_create($vmid, $conf, $disk);
};
PVE::QemuServer::update_config_nolock($vmid, $conf, 1);
});
- if($conf->{snapshots}){
- delete $conf->{parent};
- delete $conf->{snapshots};
- #fixme : do we need to delete disks snapshots ?
- }
$conf->{template} = 1;
PVE::QemuServer::update_config_nolock($vmid, $conf, 1);
}