]> git.proxmox.com Git - qemu-server.git/commit
migrate: resume initially running VM when failing after convergence
authorFabian Ebner <f.ebner@proxmox.com>
Mon, 25 Apr 2022 12:31:12 +0000 (14:31 +0200)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Tue, 26 Apr 2022 09:42:25 +0000 (11:42 +0200)
commit8a0d269b750c835d07a001a6f88320f13a45f886
tree273c5233aa804d3386142881c39fc5cc9b824d75
parent0028391f953fca71bbe60d35f41c3bfd5213e533
migrate: resume initially running VM when failing after convergence

When phase2() is aborted after the migration already converged, then
after migrate_cancel, the VM might be in POSTMIGRATE state.

(There also is a conditional for SHUTDOWN state in QEMU's
migration_iteration_finish(), so it's likely possible to end up there
if the VM is shut down at the right time during migration, but no need
to resume then).

Detect the POSTMIGRATE state and resume the VM if it wasn't paused at
the beginning of the migration. There is no direct way to go to
PAUSED, so just print an error if the VM was paused at the beginning
of the migration.

Reported-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
PVE/QemuMigrate.pm