qemu-devel
[Top][All Lists]
Advanced

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

Re: Using loadvm with snapshot


From: Kevin Wolf
Subject: Re: Using loadvm with snapshot
Date: Tue, 24 Aug 2021 18:20:51 +0200

Am 24.08.2021 um 17:25 hat Peter Maydell geschrieben:
> On Tue, 24 Aug 2021 at 16:21, Kevin Wolf <kwolf@redhat.com> wrote:
> >
> > Am 17.08.2021 um 20:48 hat Peter Maydell geschrieben:
> > > On Tue, 17 Aug 2021 at 17:27, Dr. David Alan Gilbert
> > > <dgilbert@redhat.com> wrote:
> > > >
> > > > * Gabriel Southern (gsouther@qti.qualcomm.com) wrote:
> > > > > Hi,
> > > > >
> > > > > Are there plans to support using -loadvm with -snapshot?
> > > > >
> > > > > I saw some past discussion on mailing list including bug that was 
> > > > > closed earlier this year but no recent activity:
> > > > >
> > > > > https://lore.kernel.org/qemu-devel/162424905685.11837.7303570061857383641.malone@loganberry.canonical.com/
> > > > >
> > > > > Testing with latest qemu it looks like -loadvm still does not work 
> > > > > when combined with -snapshot.
> > > > >
> > > > > I'm curious how complex it would be to implement this feature and if 
> > > > > it may show up on QEMU roadmap in the future. Or if there is 
> > > > > alterative command that can be used to save the state of a running VM 
> > > > > and then use the same qcow to run multiple QEMU instances loading 
> > > > > this VM state running in snapshot mode.
> > >
> > > Do you know why -loadvm and -snapshot don't work together?
> > > It doesn't on the face of it seem like they would be incompatible...
> >
> > Probably because -snapshot first adds a temporary qcow2 overlay to the
> > image, and then -loadvm fails because the newly created temporary
> > overlay doesn't contain the requested snapshot.
> 
> That sounds like the bug could be fixed by having "find the
> snapshot" look not just in the overlay but also down into
> the underlying image?

In this specific case yes, because we know that the overlay was just
created and is still empty.

In the general case, loading internal snapshots on a backing file would
be wrong because the data in the overlay would be from a different time
than the data in the backing file, probably causing data corruption.

Kevin




reply via email to

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