vmm: make aborted migrations on receiver side return an error

On the receiver side, a live migration with status "aborted" does not
return an error. Thus, management software will think that the live
migration was successful (from just looking at the API response). This
is not expected behaviour.

On-behalf-of: SAP sebastian.eydam@sap.com
Signed-off-by: Sebastian Eydam <sebastian.eydam@cyberus-technology.de>
This commit is contained in:
Sebastian Eydam
2026-02-11 16:20:27 +01:00
committed by Bo Chen
parent 1ae1cc787d
commit aa629a1485

View File

@@ -3071,6 +3071,9 @@ impl RequestHandler for Vmm {
event!("vm", "migration-receive-failed");
self.vm = VmOwnership::None;
self.vm_config = None;
return Err(MigratableError::CompleteMigration(anyhow!(
"Migration was aborted"
)));
}
ReceiveMigrationState::Completed => {
// Serving and resume already happened in the protocol loop.