$ virsh dominfo demo Id: 2 Name: demo UUID: eadf8ef0-bf14-4c5f-9708-4a19bacf9e81 OS Type: hvm State: running CPU(s): 2 CPU time: 15.8s Max memory: 1536000 KiB Used memory: 1536000 KiB Persistent: yes Autostart: disable Managed save: no Security model: selinux Security DOI: 0 Security label: unconfined_u:unconfined_r:svirt_t:s0:c443,c956 (permissive) Messages: tainted: custom monitor control commands issued tainted: use of deprecated configuration settings deprecated configuration: machine type 'pc-1.2' Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx> --- tools/virsh-domain-monitor.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tools/virsh-domain-monitor.c b/tools/virsh-domain-monitor.c index 02ff1fbd62..897339b6f9 100644 --- a/tools/virsh-domain-monitor.c +++ b/tools/virsh-domain-monitor.c @@ -1291,6 +1291,7 @@ cmdDominfo(vshControl *ctl, const vshCmd *cmd) char *str, uuid[VIR_UUID_STRING_BUFLEN]; int has_managed_save = 0; virshControlPtr priv = ctl->privData; + g_auto(GStrv) messages = NULL; if (!(dom = virshCommandOptDomain(ctl, cmd, NULL))) return false; @@ -1391,6 +1392,15 @@ cmdDominfo(vshControl *ctl, const vshCmd *cmd) VIR_FREE(seclabel); } } + + if (virDomainGetMessages(dom, &messages, 0) > 0) { + size_t i; + for (i = 0; messages[i] != NULL; i++) { + vshPrint(ctl, "%-15s %s\n", + i == 0 ? _("Messages:") : "", messages[i]); + } + } + virshDomainFree(dom); return ret; } -- 2.29.2