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)