]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Add a migration parameter for available bandwidth in switchover
authorJiri Denemark <jdenemar@redhat.com>
Thu, 23 Jan 2025 09:21:10 +0000 (10:21 +0100)
committerJiri Denemark <jdenemar@redhat.com>
Mon, 27 Jan 2025 15:32:57 +0000 (16:32 +0100)
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 <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
include/libvirt/libvirt-domain.h

index 2a4b81f4df88bf2c5c836ced7d997f338494fed5..74016c6c46beed6e10eb24e6ac1e6db4249952c9 100644 (file)
@@ -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:
  *