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 14:27:55 +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(+)
> 
> The following patch needs to be squashed in to make sure the
> automatically allocated port is properly released at the end of resume.
> 
> Jirka
> 
> diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
> index dbebd215b4..22a80d8430 100644
> --- a/src/qemu/qemu_migration.c
> +++ b/src/qemu/qemu_migration.c
> @@ -3485,6 +3485,7 @@ qemuMigrationDstPrepareResume(virQEMUDriver *driver,
>                                const char *origname,
>                                const char *protocol,
>                                unsigned short port,
> +                              bool autoPort,
>                                const char *listenAddress,
>                                unsigned long flags)
>  {
> @@ -3555,6 +3556,9 @@ qemuMigrationDstPrepareResume(virQEMUDriver *driver,
>      virCloseCallbacksSet(driver->closeCallbacks, vm, conn,
>                           qemuMigrationAnyConnectionClosed);
> 
> +    if (autoPort)
> +        priv->migrationPort = port;
> +
>   cleanup:
>      qemuProcessIncomingDefFree(incoming);
>      if (ret < 0)
> @@ -3633,7 +3637,8 @@ qemuMigrationDstPrepareAny(virQEMUDriver *driver,
>      if (flags & VIR_MIGRATE_POSTCOPY_RESUME) {
>          return qemuMigrationDstPrepareResume(driver, dconn, cookiein, cookieinlen,
>                                               cookieout, cookieoutlen,
> -                                             *def, origname, protocol, port,
> +                                             *def, origname, protocol,
> +                                             port, autoPort,
>                                               listenAddress, flags);



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