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

Re: [libvirt] [PATCH v4 6/9] qemu_migration: Introduce qemuMigrationStartNBDServer()



On Thu, Feb 21, 2013 at 14:39:23 +0100, Michal Privoznik wrote:
> We need to start NBD server and feed it with all non-<shared/>,
> RW and source-full disks. Moreover, with new virPortAllocator we
> must ensure the borrowed port for NBD server will be returned if
> either migration completes or qemu process is teared down.
> ---
>  src/qemu/qemu_migration.c | 76 ++++++++++++++++++++++++++++++++++++++++++++++-
>  src/qemu/qemu_process.c   |  5 ++++
>  2 files changed, 80 insertions(+), 1 deletion(-)
> 
> diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
> index 0acc1ac..f572034 100644
> --- a/src/qemu/qemu_migration.c
> +++ b/src/qemu/qemu_migration.c
> @@ -35,6 +35,7 @@
>  #include "qemu_domain.h"
>  #include "qemu_process.h"
>  #include "qemu_capabilities.h"
> +#include "qemu_command.h"
>  #include "qemu_cgroup.h"
>  
>  #include "domain_audit.h"
> @@ -1088,6 +1089,72 @@ error:
>      return NULL;
>  }
>  
> +/**
> + * qemuMigrationStartNBDServer:
> + * @driver: qemu driver
> + * @vm: domain
> + *
> + * Starts NBD server. This is a newer method to copy
> + * storage during migration than using 'blk' and 'inc'
> + * arguments in 'migrate' monitor command.
> + * Error is reported here.
> + *
> + * Returns 0 on success, -1 otherwise.
> + */
> +static int
> +qemuMigrationStartNBDServer(virQEMUDriverPtr driver,
> +                            virDomainObjPtr vm)
> +{
> +    int ret = -1;
> +    qemuDomainObjPrivatePtr priv = vm->privateData;
> +    unsigned short port = 0;
> +    const char *listenAddr = "0.0.0.0";

This will need a follow-up patch to use whatever address (0.0.0.0 or ::)
we use for qemu's -incoming. However, I think it's better to wait for
the patch that implements IPv6 support for -incoming. Or the patch could
solve both issues at the same time, what do you think Jan? ;-)

ACK

Jirka


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