There is a known issue before 4.3 (not sure if it's fixed in 4.3). Template not mark as ready fail to be deleted in CloudStack. To delete a not ready template you can to this (tested on 4.2.1):
1. find is path in the secondary storage from the manegement-server.log: 2014-05-21 09:46:11,776 WARN [cloud.template.HypervisorTemplateAdapter] (Job-Executor-14:job-1970 = [ d5395515-49f9-4c0d-8717-36724d2d054c ]) Failed to delete the template Tmpl[286-VHD-dc909ff5-3dd8-450a-aa33-912cbcaca0c5 from the image store: zone-abc due to: Unable to delete file 314 under Template path template/tmpl/22/286 2. remove all files in 286 folder 3. delete the template in cloudstack. Same procedure for ISOs. Pierre-Luc Dion Architecte de Solution Cloud | Cloud Solutions Architect 855-OK-CLOUD (855-652-5683) x1101 - - - *CloudOps*420 rue Guy Montréal QC H3J 1S6 www.cloudops.com @CloudOps_ On Tue, Apr 29, 2014 at 1:52 AM, Alexander <[email protected]> wrote: > After trying to add a new template using the register api call we ended up > with a number of identically named templates stuck. The problem was that > the download URL specified during registration was invalid and returned a > 404 error. > > However after fixing the URL we registered the template again and finally > got it all working. > > Our problem was that we now ended up with several templates with the same > name and no option to delete them. Everytime we tried to delete them it > failed to remove the templates. > > Only after restarting the management server, at which point the downloads > completed successfully, were we able to delete the duplicate templates. > >
