From 388f3368cb9bcaea8becc3a8ebae37887a3abea4 Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Fri, 31 Jul 2009 14:38:46 +0100 Subject: [PATCH] Fix removal of transient VMs when LXC aborts * src/lxc_driver.c: Remove transient VM after monitor triggered shutdown --- src/lxc_driver.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lxc_driver.c b/src/lxc_driver.c index f37fc5d964..d62c2d7e54 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)