When in 'cancelling' status, wait until the transition to 'cancelled'
happens. Similarly, when in 'wait-unplug' status, wait for the
transition to the next state.

According to the QMP reference docs:

cancelling:
> in the process of cancelling migration.

wait-unplug:
> wait for device unplug request by guest OS to be completed.

Signed-off-by: Fiona Ebner <f.eb...@proxmox.com>
---
 src/PVE/QemuMigrate.pm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/PVE/QemuMigrate.pm b/src/PVE/QemuMigrate.pm
index 5b854292..9585e292 100644
--- a/src/PVE/QemuMigrate.pm
+++ b/src/PVE/QemuMigrate.pm
@@ -1349,7 +1349,8 @@ sub phase2 {
         }
 
         my $status = $stat->{status};
-        if (defined($status) && $status =~ m/^(setup)$/im) {
+        if (defined($status) && $status =~ 
m/^(cancelling|setup|wait-unplug)$/im) {
+            $self->log('info', "migration in status '$status' - waiting for 
transition");
             sleep(1);
             next;
         }
-- 
2.47.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to