• O
    qemu: Remove the managed state file only if restoring succeeded · a73bbfc8
    Osier Yang 提交于
    1) Both "qemuDomainStartWithFlags" and "qemuAutostartDomain" try to
    restore the domain from managedsave'ed image if it exists (by
    invoking "qemuDomainObjRestore"), but it unlinks the image even
    if restoring fails, which causes data loss. (This problem exists
    for "virsh managedsave dom; virsh start dom").
    
    The fix for is to unlink the managed state file only if restoring
    succeeded.
    
    2) For "virsh save dom; virsh restore dom;", it can cause data
    corruption if one reuse the saved state file for restoring. Add
    doc to tell user about it.
    
    3) In "qemuDomainObjStart", if "managed_save" is NULL, we shouldn't
    fallback to start the domain, skipping it to cleanup as a incidental
    fix. Discovered by Eric.
    a73bbfc8
qemu_driver.c 209.5 KB