Citrix Hypervisor

Delete VMs

Important:

Citrix Hypervisor 8.2 Cumulative Update 1 becomes End of Life on June 25, 2025. Plan your upgrade to XenServer 8 now to ensure a smooth transition and continued support. For more information, see Upgrade.

If you are using your Citrix Virtual Apps and Desktops license files to license your Citrix Hypervisor 8.2 Cumulative Update 1 hosts, these license files are not compatible with XenServer 8. Before upgrading you must acquire XenServer Premium Edition socket license files to use with XenServer 8. These socket license files are available as an entitlement of the Citrix for Private Cloud, Citrix Universal Hybrid Multi-Cloud, Citrix Universal MSP, and Citrix Platform License subscriptions for running your Citrix workloads. Citrix customers who have not yet transitioned to these new subscriptions can request to participate in a no-cost promotion for 10,000 XenServer Premium Edition socket licenses. For more information, see XenServer.

If you do not get a compatible license for XenServer 8 before upgrading, when you upgrade your hosts they revert to the 90-day Trial Edition. Trial Edition provides the same features as Premium Edition with some limitations. For more information, see XenServer 8 Licensing Overview.

You can delete VMs by using the xe CLI or XenCenter.

Deleting a virtual machine removes its configuration and its filesystem from the server. When you delete a VM, you can choose to delete or preserve any virtual disks attached to the VM, in addition to any snapshots of the VM.

Delete a VM by using the xe CLI

To delete a VM:

  1. Find the VM UUID:

    xe vm-list
    
  2. Shutdown the VM:

    xe vm-shutdown uuid=<uuid>
    
  3. (Optional) You can choose to delete the attached virtual disks:

    1. Find the virtual disk UUIDs:

      xe vm-disk-list vm=<uuid>
      
    2. Delete the virtual disk:

      xe vdi-destroy uuid=<uuid>
      

    Important:

    Any data stored in the VM’s virtual disk drives is lost.

  4. (Optional) You can choose to delete the snapshots associated with the VM:

    1. Find the UUIDs of the snapshots:

      xe snapshot-list snapshot-of=<uuid>
      
    2. For each snapshot to delete, find the UUIDs of the virtual disks for that snapshot:

      xe snapshot-disk-list snapshot-uuid=<uuid>
      
    3. Delete each snapshot disk:

      xe vdi-destroy uuid=<uuid>
      
    4. Delete the snapshot:

      xe snapshot-destroy uuid=<uuid>
      
  5. Delete the VM:

    xe vm-destroy uuid=<uuid>
    

Delete a VM by using XenCenter

To delete a VM:

  1. Shut down the VM.
  2. Select the stopped VM in the Resources panel, right-click, and select Delete on the shortcut menu. Alternatively, on the VM menu, select Delete.
  3. To delete an attached virtual disk, select its check box.

    Important:

    Any data stored in the VM’s virtual disk drives is lost.

  4. To delete a snapshot of the VM, select its check box.
  5. Click Delete.

    When the delete operation is completed, the VM is removed from the Resources pane.

Note:

VM snapshots whose parent VM has been deleted (orphan snapshots) can still be accessed from the Resources pane. These snapshots can be exported, deleted, or used to create VMs and templates. To view snapshots in the Resources pane, select Objects in the Navigation pane and then expand the Snapshots group in the Resources pane.

Delete VMs