From: Jiri Denemark Date: Thu, 23 Jan 2025 09:21:10 +0000 (+0100) Subject: Add a migration parameter for available bandwidth in switchover X-Git-Tag: v11.1.0-rc1~176 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c417ebf66072d63d7e74e868d7250c8ae49830d1;p=thirdparty%2Flibvirt.git Add a migration parameter for available bandwidth in switchover The new VIR_MIGRATE_PARAM_BANDWIDTH_AVAIL_SWITCHOVER parameter can be used to override the estimated bandwidth that can be used for transferring guest memory and device state once virtual CPUs are stopped. Signed-off-by: Jiri Denemark Reviewed-by: Michal Privoznik --- diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h index 2a4b81f4df..74016c6c46 100644 --- a/include/libvirt/libvirt-domain.h +++ b/include/libvirt/libvirt-domain.h @@ -1206,6 +1206,24 @@ typedef enum { */ # define VIR_MIGRATE_PARAM_BANDWIDTH_POSTCOPY "bandwidth.postcopy" +/** + * VIR_MIGRATE_PARAM_BANDWIDTH_AVAIL_SWITCHOVER: + * + * virDomainMigrate* params field: the bandwidth (in MiB/s) available for the + * final phase of (pre-copy) migration during which CPUs are stopped and all + * the remaining memory and device state is transferred. Knowing this bandwidth + * is important for accurate estimation of the domain downtime and deciding + * the right moment for switching over. Normally this would be estimated based + * on the bandwidth used by migration, but this could be lower than the actual + * available bandwidth. Using this parameter to override the computed value may + * help with migration convergence when the migration would keep iterating over + * and over thinking there's not enough bandwidth to comply with the configured + * maximum downtime. + * + * Since: 11.1.0 + */ +# define VIR_MIGRATE_PARAM_BANDWIDTH_AVAIL_SWITCHOVER "bandwidth.avail.switchover" + /** * VIR_MIGRATE_PARAM_GRAPHICS_URI: *