[gnome-boxes] libvirt-machine: Delete snapshots with machine



commit 6aef7bb5602b93c023e603ae02c01c142461ddeb
Author: Timm Bäder <mail baedert org>
Date:   Fri Jul 25 11:07:03 2014 +0200

    libvirt-machine: Delete snapshots with machine
    
    libvirt does not allow to delete/undefine domains that have snapshot
    metadata attached. Sine creating snapshots will be possible, we need to
    pass GVir.DomainDeleteFlags.SNAPSHOTS_METADATA to the delete() call of
    the domain, so the user can even delete domains with snapshots.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=710306

 src/libvirt-machine.vala |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/libvirt-machine.vala b/src/libvirt-machine.vala
index 48fb98c..804d34b 100644
--- a/src/libvirt-machine.vala
+++ b/src/libvirt-machine.vala
@@ -403,7 +403,8 @@ private class Boxes.LibvirtMachine: Boxes.Machine {
             run_in_thread.begin ( () => {
                 try {
                     // This undefines the domain, causing it to be transient if it was running
-                    domain.delete (DomainDeleteFlags.SAVED_STATE);
+                    domain.delete (DomainDeleteFlags.SAVED_STATE |
+                                   DomainDeleteFlags.SNAPSHOTS_METADATA);
                 } catch (GLib.Error err) {
                     warning (err.message);
                 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]