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(+)
+ 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()
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. libvirt/ driver. py | 4 ++++
We don't need post-copy on those VMs anyway.
---
nova/virt/
1 file changed, 4 insertions(+)
diff --git a/nova/ virt/libvirt/ driver. py b/nova/ virt/libvirt/ driver. py virt/libvirt/ driver. py virt/libvirt/ driver. py driver. ComputeDriver) :
migration_ flags = self._live_ migration_ flags
index 3e78723..9ffe60a 100644
--- a/nova/
+++ b/nova/
@@ -9016,6 +9016,9 @@ class LibvirtDriver(
else:
+ if instance.vm_state == vm_states.PAUSED: VIR_MIGRATE_ POSTCOPY
serial_ listen_ addr = libvirt_ migrate. serial_ listen_ addr(
migrate_ data) driver. ComputeDriver) :
is_post_ copy_enabled = self._is_ post_copy_ enabled( migration_ flags)
is_post_ copy_enabled &= not bool(self. _get_vpmems( instance) ) copy_enabled &= not (instance.vm_state == vm_states.PAUSED) job_info( )
+ migration_flags &= ~libvirt.
+
if not serial_listen_addr:
@@ -9262,6 +9265,7 @@ class LibvirtDriver(
# vpmem does not support post copy
+ is_post_
while True:
info = guest.get_
With this, the migrations work fine. /bugs.launchpad .net/nova/ +bug/1947725
However, the bug about two migrations in a row still applies: https:/
If you still want log with the original errors, I will have to undo this patch to recreate it.