Deleting XenServer templates


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.

2 thoughts on “Deleting XenServer templates

  1. Permalink  ⋅ Reply

    Dean Kamali

    April 15, 2013 at 8:55pm

    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.

  2. Permalink  ⋅ Reply

    John

    May 29, 2013 at 10:53pm

    Thanks My Brother

Leave a Reply

Your email will not be published. Name and Email fields are required.