[libvirt] PATCH: Fix cleanup of transient VMs

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

 



If a transient VM quit unexpectedly it would never be cleaned up, resulting
in a guest that's impossible to remove

Daniel

commit 7781032c3d870f5c9dacfc02baecc151689d9c57
Author: Daniel P. Berrange <berrange@xxxxxxxxxx>
Date:   Fri Jul 31 14:38:46 2009 +0100

    Fix removal of transient VMs when LXC aborts
    
    * src/lxc_driver.c: Remove transient VM after monitor triggered
      shutdown

diff --git a/src/lxc_driver.c b/src/lxc_driver.c
index f37fc5d..d62c2d7 100644
--- a/src/lxc_driver.c
+++ b/src/lxc_driver.c
@@ -774,6 +774,10 @@ static void lxcMonitorEvent(int watch,
                                          VIR_DOMAIN_EVENT_STOPPED,
                                          VIR_DOMAIN_EVENT_STOPPED_SHUTDOWN);
     }
+    if (!vm->persistent) {
+        virDomainRemoveInactive(&driver->domains, vm);
+        vm = NULL;
+    }
 
 cleanup:
     if (vm)


-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]