[RESEND] virsh: tell if running domain conf is updated

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

 



Based on "virDomainIsUpdated" API, to tell if the running domain
configuration is updated by "attach/detach/update device" and
"setvcpus" via "dominfo".

* tools/virsh.c
---
 tools/virsh.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/tools/virsh.c b/tools/virsh.c
index 4e37f2d..2960b79 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -2038,6 +2038,7 @@ cmdDominfo(vshControl *ctl, const vshCmd *cmd)
     virSecurityModel secmodel;
     virSecurityLabel seclabel;
     int persistent = 0;
+    int updated = -1;
     int ret = TRUE, autostart;
     unsigned int id;
     char *str, uuid[VIR_UUID_STRING_BUFLEN];
@@ -2099,6 +2100,15 @@ cmdDominfo(vshControl *ctl, const vshCmd *cmd)
     else
         vshPrint(ctl, "%-15s %s\n", _("Persistent:"), persistent ? _("yes") : _("no"));

+    /* Check and display whether the domain running configuration is
+     * updated or not.
+     */
+    updated = virDomainIsUpdated(dom);
+    if (updated < 0)
+        vshPrint(ctl, "%-15s %s\n", _("Updated:"), _("unknown"));
+    else
+        vshPrint(ctl, "%-15s %s\n", _("Updated:"), updated ? _("yes") : _("no"));
+
     /* Check and display whether the domain autostarts or not */
     if (!virDomainGetAutostart(dom, &autostart)) {
         vshPrint(ctl, "%-15s %s\n", _("Autostart:"),
--
1.7.3.2

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