mirror of https://gitee.com/openkylin/libvirt.git
qemuDomainObjStart: Warn on corrupted image
If the managedsave image is corrupted, e.g. the XML part is, we fail to parse it and throw an error, e.g.: error: Failed to start domain jms8 error: XML error: missing security model when using multiple labels This is okay, as we can't really start the machine and avoid undefined qemu behaviour. On the other hand, the error message doesn't give a clue to users what should they do. The consensus here would be to thrown a warning to logs saying "Hey, you've got a corrupted file". Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
0a85160f26
commit
cfc28c66f9
|
@ -6039,10 +6039,13 @@ qemuDomainObjStart(virConnectPtr conn,
|
|||
vm->hasManagedSave = false;
|
||||
}
|
||||
|
||||
if (ret > 0)
|
||||
if (ret > 0) {
|
||||
VIR_WARN("Ignoring incomplete managed state %s", managed_save);
|
||||
else
|
||||
} else {
|
||||
VIR_WARN("Unable to restore from managed state %s. "
|
||||
"Maybe the file is corrupted?", managed_save);
|
||||
goto cleanup;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue