Sometimes XenServer doesn’t allow you to delete templates from the XenCenter GUI or even the CLI. Here is how to delete templates from the CLI in three steps:

  • Tell XenServer the template is not a default template
  • Convert the template to a VM
  • Delete the VM
xe template-param-set other-config:default_template=false uuid=[uuid]
xe template-param-set is-a-template=false uuid=[uuid]
xe vm-destroy uuid=[uuid]

where [uuid] is the UUID of the template you want to delete.

Deleting XenServer templates
Tagged on:

3 thoughts on “Deleting XenServer templates

  • 2013-04-15 at 20:55
    Permalink

    thanks, just to noted that right after I have I ran “xe template-param-set is-a-template=false uuid=” My vms started with yellow sign, then I had to run “xe-toolstack-restart” then I was able to delete them vms from xencetner.

    Reply
  • 2021-05-04 at 18:36
    Permalink

    Good stuff! Seems to work with my XCP-ng pool (v 8.2.0)

    Reply

Leave a Reply to Dean Kamali Cancel reply

Your email address will not be published. Required fields are marked *