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 <fiu...@linux.vnet.ibm.com>
---
 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@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to