Can't destroy template

Santiago GH

Active Member
Feb 19, 2018
3
0
41
62
Hi all.

I have a template and linked clones.

I have deleted all the clones with "qm destroy <vmid>", but when i try to delete the templage, i get the following message:

TASK ERROR: base volume 'cabina:300/base-300-disk-0.qcow2' is still in use by linked cloned

I have checked that there is not any cloned vm in any node.

Any suggestion?

Thanks in advance.
 
check all your storages for images that still are based on that image
 
  • Like
Reactions: Santiago GH
Thank you for your super fast and accurate answer. (thumbs up)

There were several orphan images. Everything ok now.

Regards.

Santiago GH.
 
And how does one do that?
grep -iRl 'base-VMID' /etc/pve/ should work, replace the VMID with the template's VMID, e.g. grep -iRl 'base-300' /etc/pve/

that will give you a list of VMs using that image
 
  • Like
Reactions: MoxProxxer
Hi,
if you also want to catch orphaned images (i.e. those not showing up in any configuration file), you can use
Code:
pvesh get /nodes/<node>/storage/<storage ID>/content
replacing <node> and <storage ID> appropriately and checking the parent column.
 
  • Like
Reactions: MoxProxxer