qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unable to make snapshots with "savevm" on OVMF guest


From: Peter Maydell
Subject: Re: Unable to make snapshots with "savevm" on OVMF guest
Date: Thu, 6 Oct 2022 12:05:32 +0100

On Wed, 5 Oct 2022 at 23:53, <xtec@trimaso.com.mx> wrote:
>
> There are no issues with "offline" snapshots with qemu-img with the
> guest powered off.
>
> However, with "online" snapshots through QEMU monitor I get this:
>
> Error: Device 'pflash1' is writable but does not support snapshots
>
> Indeed, it's trying to use the OVMF-vars "disk", which is of course not
> compatible.
>
> I already did internet search, but at most they suggest "just convert
> the pflash1 to qcow2".
> Hell! That's not what it is for.

I think the problem here is that savevm will store device/CPU
state on one specific QCOW2-attached storage, but any writable disks
themselves must be able to support snapshots in order to be
able to track "at this point when the machine was snapshotted
the state of the disk contents is such-and-such". So I suspect
that you need to either:
 * make the pflash be a non-writeable disk -- then there's no
   need to track what its state at the time of snapshot was,
   because it'll always be constant
 * make the pflash be backed by a qcow2 image or other snapshot-capable
   format, so that it can track its different contents for each
   snapshot point

> Isn't there a way to tell savevm *which* storage to use?

The monitor documentation
https://www.qemu.org/docs/master/system/images.html#vm-005fsnapshots

says "The VM state info is stored in the first qcow2 non removable and
 writable block device. The disk image snapshots are stored in every
 disk image."

so I think the answer to that is "no", except by playing games with
the command line to ensure that the disk image you want the VM
state itself to be on is the "first" one. (And in any case the
saved state for writeable disk images themselves must always go
into each writeable disk image.)

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]