diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c index 26174232da..1e3ec30d56 100644 --- a/src/lxc/lxc_controller.c +++ b/src/lxc/lxc_controller.c @@ -1781,7 +1781,7 @@ int main(int argc, char *argv[]) if ((def = virDomainDefParseFile(caps, configFile, 1 << VIR_DOMAIN_VIRT_LXC, - VIR_DOMAIN_XML_INACTIVE)) == NULL) + 0)) == NULL) goto cleanup; if (def->nnets != nveths) { diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c index 7e7affd75a..ffdd4ac5ac 100644 --- a/src/lxc/lxc_driver.c +++ b/src/lxc/lxc_driver.c @@ -1955,17 +1955,15 @@ static int lxcVmStart(virConnectPtr conn, lxcProcessAutoDestroyAdd(driver, vm, conn) < 0) goto error; - /* - * Again, need to save the live configuration, because the function - * requires vm->def->id != -1 to save tty info surely. - */ - if (virDomainSaveConfig(driver->stateDir, vm->def) < 0) - goto error; - if (virDomainObjSetDefTransient(driver->caps, vm, false) < 0) goto error; - /* Write domain status to disk. */ + /* Write domain status to disk. + * + * XXX: Earlier we wrote the plain "live" domain XML to this + * location for the benefit of libvirt_lxc. We're now overwriting + * it with the live status XML instead. This is a (currently + * harmless) inconsistency we should fix one day */ if (virDomainSaveStatus(driver->caps, driver->stateDir, vm) < 0) goto error;