Re: [libvirt PATCH v2 66/81] qemu: Implement VIR_MIGRATE_POSTCOPY_RESUME for Prepare phase

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

 



On Fri, Jun 03, 2022 at 16:10:07 +0200, Jiri Denemark wrote:
> On Wed, Jun 01, 2022 at 14:50:06 +0200, Jiri Denemark wrote:
> > The QEMU process is already running, all we need to do is to call
> > migrate-recover QMP command. Except for some checks and cookie handling,
> > of course.
> > 
> > Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx>
> > Reviewed-by: Peter Krempa <pkrempa@xxxxxxxxxx>
> > Reviewed-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
> > ---
> > 
> > Notes:
> >     Version 2:
> >     - no change
> > 
> >  src/qemu/qemu_migration.c | 99 +++++++++++++++++++++++++++++++++++++++
> >  1 file changed, 99 insertions(+)
> 
> And the following diff is needed to make sure the Finish phase sees the
> original name of the domain in case it was renamed during migration (via
> --dname ... option).
> 
> Jirka
> 
> diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
> index 22a80d8430..506b6cde7a 100644
> --- a/src/qemu/qemu_migration.c
> +++ b/src/qemu/qemu_migration.c
> @@ -3534,6 +3534,8 @@ qemuMigrationDstPrepareResume(virQEMUDriver *driver,
>                                           QEMU_MIGRATION_COOKIE_CAPS)))
>          goto cleanup;
> 
> +    priv->origname = g_strdup(origname);
> +
>      if (!(incoming = qemuMigrationDstPrepare(vm, false, protocol,
>                                               listenAddress, port, -1)))
>          goto cleanup;
> @@ -3561,8 +3563,10 @@ qemuMigrationDstPrepareResume(virQEMUDriver *driver,
> 
>   cleanup:
>      qemuProcessIncomingDefFree(incoming);
> -    if (ret < 0)
> +    if (ret < 0) {
> +        VIR_FREE(priv->origname);
>          ignore_value(qemuMigrationJobSetPhase(vm, QEMU_MIGRATION_PHASE_POSTCOPY_FAILED));
> +    }
>      qemuDomainCleanupAdd(vm, qemuProcessCleanupMigrationJob);
>      qemuMigrationJobContinue(vm);
>      virDomainObjEndAPI(&vm);
> 

Reviewed-by: Peter Krempa <pkrempa@xxxxxxxxxx>




[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