[libvirt PATCH 1/3] qemu_migration: Store original migration params in status XML

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We keep original values of migration parameters so that we can restore
them at the end of migration to make sure later migration does not use
some random values. However, this does not really work when libvirt
daemon is restarted on the source host because we failed to explicitly
save the status XML after getting the migration parameters from QEMU.
Actually it might work if the status XML is written later for some other
reason such as domain state change, but that's not how it should work.

https://bugzilla.redhat.com/show_bug.cgi?id=2107892

Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx>
---
 src/qemu/qemu_migration.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index 20dc91f1ce..769b818f66 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -3245,6 +3245,9 @@ qemuMigrationDstPrepareActive(virQEMUDriver *driver,
                                  migParams, mig->caps->automatic) < 0)
         goto error;
 
+    /* Save original migration parameters */
+    qemuDomainSaveStatus(vm);
+
     /* Migrations using TLS need to add the "tls-creds-x509" object and
      * set the migration TLS parameters */
     if (flags & VIR_MIGRATE_TLS) {
@@ -4821,6 +4824,9 @@ qemuMigrationSrcRun(virQEMUDriver *driver,
                                  migParams, mig->caps->automatic) < 0)
         goto error;
 
+    /* Save original migration parameters */
+    qemuDomainSaveStatus(vm);
+
     if (flags & VIR_MIGRATE_TLS) {
         const char *hostname = NULL;
 
-- 
2.35.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux