If we load such domains, we don't need to handle invalid XML checking in
qemuProcessStart, but we can move it to qemuDomainDefPostParse() or even
into the parsing functions if all goes well. So the only thing we'll
need to worry about after this is XML parsing code that would error out
for running domains or non-qemu drivers. The latter will be fixed in
following patches, hence making the active XML parsing the only
problematic part.
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
src/qemu/qemu_driver.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 881c5c4c1984..c4df44c9f71f 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -312,6 +312,7 @@ qemuAutostartDomain(virDomainObjPtr vm,
virObjectRef(vm);
virResetLastError();
if (vm->autostart &&
+ !vm->def->parseError &&
!virDomainObjIsActive(vm)) {
if (qemuDomainObjBeginJob(data->driver, vm,
QEMU_JOB_MODIFY) < 0) {
@@ -951,7 +952,7 @@ qemuStateInitialize(bool privileged,
cfg->autostartDir, 0,
qemu_driver->caps,
qemu_driver->xmlopt,
- false,
+ true,
NULL, NULL) < 0)
goto error;
@@ -1032,7 +1033,7 @@ qemuStateReload(void)
cfg->configDir,
cfg->autostartDir, 0,
caps, qemu_driver->xmlopt,
- false,
+ true,
qemuNotifyLoadDomain, qemu_driver);
cleanup:
virObjectUnref(cfg);
--
2.5.3