mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
Wire the new `downtime_ms`, `timeout_s`, and `timeout_strategy` fields from `VmSendMigrationData` into the precopy loop, replacing the previous hard-coded 5-iteration cap. Each iteration now evaluates three convergence criteria in order: - no dirty pages remain; - the estimated final-iteration downtime is within the configured budget - or the overall migration timeout has elapsed. On timeout, `TimeoutStrategy::Cancel` aborts and keeps the VM live on the source, while `TimeoutStrategy::Force` proceeds regardless of the downtime target. The convergence callback is updated to return a Result to propagate the cancel error cleanly up the call stack. With the recent changes [0], it is fairly easy to implement the new checks and operate on actual metrics. These changes are inspired by [1] but differ significantly in details. [0] https://github.com/cloud-hypervisor/cloud-hypervisor/pull/7799 [1] https://github.com/cloud-hypervisor/cloud-hypervisor/pull/7033 Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de> On-behalf-of: SAP philipp.schuster@sap.com