[pve-devel] [PATCH] savevm-end : wait that savevm is finished

Dietmar Maurer dietmar at proxmox.com
Fri Nov 21 08:53:54 CET 2014


> savevm-end is async, we need to wait that savevm is finished, before continue.

What exactly is async in 'savevm-end'? Instead, I thought 'savevm-start' is async?

---code--------
void qmp_savevm_end(Error **errp)
{
    if (snap_state.state == SAVE_STATE_DONE) {
        error_set(errp, ERROR_CLASS_GENERIC_ERROR,
                  "VM snapshot not started\n");
        return;
    }

    if (snap_state.saved_vm_running) {
        vm_start();
    }

    snap_state.state = SAVE_STATE_DONE;
}
----------------

IMHO, this is synchronous, and it is wrong to call while 'savevm-start' is 
still running (will cancel savevm)?

So maybe we need to wait with 'query-savevm' before we call 'savevm-end'? 







More information about the pve-devel mailing list