[libvirt] PATCH: Fix cleanup of transient VMs

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@redhat.com> 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 :|

On Fri, Jul 31, 2009 at 03:55:12PM +0100, Daniel P. Berrange wrote:
If a transient VM quit unexpectedly it would never be cleaned up, resulting in a guest that's impossible to remove
Ouch ! ACK, Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/
participants (2)
-
Daniel P. Berrange
-
Daniel Veillard