Bug #22221: Revert Qemu to old behaviour when restoring snapshots. --- a/savevm.c +++ b/savevm.c @@ -2018,8 +2018,6 @@ int load_vmstate(const char *name) ret = bdrv_snapshot_find(bs_vm_state, &sn, name); if (ret < 0) { return ret; - } else if (sn.vm_state_size == 0) { - return -EINVAL; } /* Verify if there is any device that doesn't support snapshots and is @@ -2060,6 +2058,9 @@ int load_vmstate(const char *name) } } + if (sn.vm_state_size == 0) + return -EINVAL; + /* restore the VM state */ f = qemu_fopen_bdrv(bs_vm_state, 0); if (!f) {