Comment 3 for bug 1946752

Revision history for this message
Olaf Seibert (oseibert-sys11) wrote :

As I recall, the error does not occur at the time when the post-copy is attempted.

Rather, the error already occurs at the very start of the migration. The error text "post-copy migration is not supported with non-live or paused migration" comes from https://github.com/libvirt/libvirt/blob/master/src/qemu/qemu_migration.c#L2362

We run locally with this patch applied:

From: Olaf Seibert <email address hidden>
Date: Fri, 15 Oct 2021 12:02:12 +0000
Subject: Disable post-copy if a VM is PAUSED

because libvirt does not support this combination.
We don't need post-copy on those VMs anyway.
---
 nova/virt/libvirt/driver.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/nova/virt/libvirt/driver.py b/nova/virt/libvirt/driver.py
index 3e78723..9ffe60a 100644
--- a/nova/virt/libvirt/driver.py
+++ b/nova/virt/libvirt/driver.py
@@ -9016,6 +9016,9 @@ class LibvirtDriver(driver.ComputeDriver):
             else:
                 migration_flags = self._live_migration_flags

+ if instance.vm_state == vm_states.PAUSED:
+ migration_flags &= ~libvirt.VIR_MIGRATE_POSTCOPY
+
             serial_listen_addr = libvirt_migrate.serial_listen_addr(
                 migrate_data)
             if not serial_listen_addr:
@@ -9262,6 +9265,7 @@ class LibvirtDriver(driver.ComputeDriver):
         is_post_copy_enabled = self._is_post_copy_enabled(migration_flags)
         # vpmem does not support post copy
         is_post_copy_enabled &= not bool(self._get_vpmems(instance))
+ is_post_copy_enabled &= not (instance.vm_state == vm_states.PAUSED)
         while True:
             info = guest.get_job_info()

With this, the migrations work fine.
However, the bug about two migrations in a row still applies: https://bugs.launchpad.net/nova/+bug/1947725

If you still want log with the original errors, I will have to undo this patch to recreate it.