Luiz Capitulino <lcapitul...@redhat.com> wrote: > do_loadvm(), which implements the 'loadvm' Monitor command, pauses > the emulation to load the saved VM, however it will only resume > it if the loading succeeds. > > In other words, if the user issues 'loadvm' and it fails, the > end result will be an error message and a paused VM. > > This seems an undesirable side effect to me because, most of the > time, if a Monitor command fails the best thing we can do is to > leave the VM as it were before the command was executed. > > FIXME: This will try to run a potentially corrupted image, the > solution is to split load_vmstate() in two and only keep > the VM paused if qemu_loadvm_state() fails.
Any of the other errors in loadvm also requires you to not load the state. > Signed-off-by: Luiz Capitulino <lcapitul...@redhat.com> Nack. This can cause disk corruption. You tried to load a vm image, failed the load somehow (notice the somehow) and you try to run it anyways. That is a recipe for disaster. If load_vmstate() fails -> you don't run. Current code is a mess, but don't do things worse. Later, Juan.