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

Re: [Xen-devel] [PATCH 2/2] xl: add target cpupool parameter to xl migrate



On Tue, Oct 02, 2018 at 04:19:34PM +0200, Juergen Gross wrote:
> Add an option to specify the cpupool on the target machine when doing
> a migration of a domain. Currently a domain is always migrated to the
> cpupool with the same name as on the source machine.
> 
> Specifying "-c <cpupool>" will migrate the domain to the specified
> cpupool on the target machine. Specifying an empty string for <cpupool>
> will use the default cpupool (normally "Pool-0") on the target machine.

I think this is a worthwhile addition to xl.

> diff --git a/tools/xl/xl_saverestore.c b/tools/xl/xl_saverestore.c
> index 9afeadeeb2..2583b6c800 100644
> --- a/tools/xl/xl_saverestore.c
> +++ b/tools/xl/xl_saverestore.c
> @@ -33,6 +33,7 @@
>  
>  void save_domain_core_begin(uint32_t domid,
>                              const char *override_config_file,
> +                            const char *override_cpupool,
>                              uint8_t **config_data_r,
>                              int *config_len_r)
>  {
> @@ -63,6 +64,13 @@ void save_domain_core_begin(uint32_t domid,
>          }
>      }
>  
> +    if (override_cpupool) {
> +        free(d_config.c_info.pool_name);
> +        d_config.c_info.pool_name = NULL;
> +        if (override_cpupool[0])
> +            d_config.c_info.pool_name = strdup(override_cpupool);

xstrdup please.

> +    }
> +
>      config_c = libxl_domain_config_to_json(ctx, &d_config);
>      if (!config_c) {
>          fprintf(stderr, "unable to convert config file to JSON\n");
> @@ -126,7 +134,7 @@ static int save_domain(uint32_t domid, const char 
> *filename, int checkpoint,
>      uint8_t *config_data;
>      int config_len;
>  
> -    save_domain_core_begin(domid, override_config_file,
> +    save_domain_core_begin(domid, override_config_file, NULL,
>                             &config_data, &config_len);
>  
>      if (!config_len) {
> -- 
> 2.16.4
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.