Re: [libvirt PATCH v2 4/6] qemu_snapshot: correctly load the saved memory state file

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

 



On Fri, Sep 01, 2023 at 10:32:15 +0200, Pavel Hrdina wrote:
> Original code assumed that the memory state file is only migration
> stream but it has additional metadata stored by libvirt. To correctly
> load the memory state file we need to reuse code that is used when
> restoring domain from saved image.
> 
> This duplicates some necessary parts of qemuSaveImageStartVM() because
> the external snapshot memory state is done by qemuSaveImageCreate().
> 
> Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
> ---
>  src/qemu/qemu_snapshot.c | 115 +++++++++++++++++++++++++++++++++------
>  1 file changed, 97 insertions(+), 18 deletions(-)

[...]

>      /* No cookie means libvirt which saved the domain was too old to
>       * mess up the CPU definitions.
>       */
> @@ -2307,17 +2355,48 @@ qemuSnapshotRevertActive(virDomainObj *vm,
>  
>      rc = qemuProcessStart(snapshot->domain->conn, driver, vm,
>                            cookie ? cookie->cpu : NULL,

As noted in review of v1, we ought to use the cookie from the save image
or at least validate that this one is correct.




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux