[PATCH v2] qemu: remove panic dev models s390 and pseries when migrating

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

 



The panic devices with models s390 and pseries are autogenerated.
For backwards compatibility reasons the devices are to be removed
when migrating.

Signed-off-by: Boris Fiuczynski <fiuczy@xxxxxxxxxxxxxxxxxx>
---
 src/qemu/qemu_domain.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index ceac22f..82fa817 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -3310,6 +3310,15 @@ qemuDomainDefFormatBuf(virQEMUDriverPtr driver,
             virDomainControllerDefFree(usb);
         }
 
+        /* Remove the panic device for selected models if present */
+        for (i = 0; i < def->npanics; i++) {
+            if (def->panics[i]->model == VIR_DOMAIN_PANIC_MODEL_S390 ||
+                def->panics[i]->model == VIR_DOMAIN_PANIC_MODEL_PSERIES) {
+                VIR_DELETE_ELEMENT(def->panics, i, def->npanics);
+                i--;
+            }
+        }
+
         for (i = 0; i < def->nchannels; i++)
             qemuDomainChrDefDropDefaultPath(def->channels[i], driver);
     }
-- 
2.9.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[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]