[PATCH 06/33] qemu_validate.c: enhance 'machine type not supported' message

Daniel Henrique Barboza danielhb413 at gmail.com
Thu Jan 20 13:52:09 UTC 2022


Add 'virt type' to allow for an easier time debugging.

Signed-off-by: Daniel Henrique Barboza <danielhb413 at gmail.com>
---
 src/qemu/qemu_validate.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c
index da41848761..95af0ecf3b 100644
--- a/src/qemu/qemu_validate.c
+++ b/src/qemu/qemu_validate.c
@@ -1101,8 +1101,10 @@ qemuValidateDomainDef(const virDomainDef *def,
 
     if (!virQEMUCapsIsMachineSupported(qemuCaps, def->virtType, def->os.machine)) {
         virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                       _("Emulator '%s' does not support machine type '%s'"),
-                       def->emulator, def->os.machine);
+                       _("Emulator '%s' does not support machine type '%s' "
+                         "for virt type '%s'"),
+                       def->emulator, def->os.machine,
+                       virDomainVirtTypeToString(def->virtType));
         return -1;
     }
 
-- 
2.34.1




More information about the libvir-list mailing list