KVM virsh how to delete external snapshot

When you try to delete an external snapshot with the snapshot-delete command you can get this: error: unsupported configuration: deletion of 1 external disk snapshots not supported yet.

Here is how you can delete an external snapshot properly:

1. List external snapshots:

1
2
3
4
5
6
7
8
# virsh snapshot-list fedora-27 --external 
 Name                 Creation Time             State
------------------------------------------------------------
 1519725138           2018-02-27 12:52:18 +0300 running
 name1                2018-02-27 13:56:16 +0300 running
 name2                2018-02-27 13:56:33 +0300 running
 name3                2018-02-28 11:36:04 +0300 disk-snapshot
 newsnapshot          2018-02-27 12:51:53 +0300 running

2. Let's say we want to delete newsnapshot. First, find the snapshot file:

# virsh snapshot-dumpxml fedora-27 newsnapshot | grep "snapshot='external' file="
  <memory snapshot='external' file='/home/user/newsnapshot'/>

3. Delete the metadata:

# virsh snapshot-delete fedora-27 newsnapshot
Domain snapshot newsnapshot deleted

4. Remove the snapshot file:

# rm /home/user/newsnapshot
Edit
Pub: 04 Mar 2018 10:22 UTC
Views: 2628